info.magnolia.freemarker
Class MessagesWrapper
java.lang.Object
info.magnolia.freemarker.MessagesWrapper
public class MessagesWrapper
- extends java.lang.Object
Utility class that has methods which allow passing multiple parameters
from a freemarker template to a message string using the square bracket
syntax (e.g. ${i18n.get('message', ['param1', 'param2']}). There are
convenience methods which allow selecting the message bundle directly
from within the template as well (by passing the basename parameter), but using those methods removed fallback to default message bundles so they should be used only when such custom bundle contains all messages requested in given context.
- Version:
- $Id: $
- Author:
- vsteller
- See Also:
info.magnolia.freemarker.FreemarkerHelperTest} for more syntax details.
Method Summary |
java.lang.String |
get(java.lang.String key)
|
java.lang.String |
get(java.lang.String key,
java.util.List args)
|
protected java.lang.String |
get(java.lang.String key,
java.util.List args,
Messages messages)
|
java.lang.String |
get(java.lang.String key,
java.util.List args,
java.lang.String basename)
|
protected java.lang.String |
get(java.lang.String key,
Messages messages)
|
java.lang.String |
get(java.lang.String key,
java.lang.String basename)
|
java.lang.String |
getWithDefault(java.lang.String key,
java.util.List args,
java.lang.String defaultMsg)
|
protected java.lang.String |
getWithDefault(java.lang.String key,
java.util.List args,
java.lang.String defaultMsg,
Messages messages)
|
java.lang.String |
getWithDefault(java.lang.String key,
java.util.List args,
java.lang.String defaultMsg,
java.lang.String basename)
|
java.lang.String |
getWithDefault(java.lang.String key,
java.lang.String defaultMsg)
|
protected java.lang.String |
getWithDefault(java.lang.String key,
java.lang.String defaultMsg,
Messages messages)
|
java.lang.String |
getWithDefault(java.lang.String key,
java.lang.String defaultMsg,
java.lang.String basename)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
get
public java.lang.String get(java.lang.String key)
get
public java.lang.String get(java.lang.String key,
java.util.List args)
get
public java.lang.String get(java.lang.String key,
java.lang.String basename)
get
public java.lang.String get(java.lang.String key,
java.util.List args,
java.lang.String basename)
getWithDefault
public java.lang.String getWithDefault(java.lang.String key,
java.lang.String defaultMsg)
getWithDefault
public java.lang.String getWithDefault(java.lang.String key,
java.lang.String defaultMsg,
java.lang.String basename)
getWithDefault
public java.lang.String getWithDefault(java.lang.String key,
java.util.List args,
java.lang.String defaultMsg)
getWithDefault
public java.lang.String getWithDefault(java.lang.String key,
java.util.List args,
java.lang.String defaultMsg,
java.lang.String basename)
get
protected java.lang.String get(java.lang.String key,
Messages messages)
get
protected java.lang.String get(java.lang.String key,
java.util.List args,
Messages messages)
getWithDefault
protected java.lang.String getWithDefault(java.lang.String key,
java.lang.String defaultMsg,
Messages messages)
getWithDefault
protected java.lang.String getWithDefault(java.lang.String key,
java.util.List args,
java.lang.String defaultMsg,
Messages messages)
Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.