com.xpn.xwiki.plugin.applicationmanager.core.plugin
Class XWikiPluginMessageTool
java.lang.Object
com.xpn.xwiki.web.XWikiMessageTool
com.xpn.xwiki.plugin.applicationmanager.core.plugin.XWikiPluginMessageTool
- Direct Known Subclasses:
- ApplicationManagerMessageTool
public class XWikiPluginMessageTool
- extends com.xpn.xwiki.web.XWikiMessageTool
Plugin internationalization service based XWikiMessageTool.
- Version:
- $Id: $
| Fields inherited from class com.xpn.xwiki.web.XWikiMessageTool |
bundle, BYTE_ENCODING, context |
|
Method Summary |
java.lang.String |
get(java.lang.String key,
java.lang.String param)
Find a translation and then replace any parameters found in the translation by the passed param parameter. |
java.lang.String |
get(java.lang.String key,
java.lang.String[] params)
Find a translation and then replace any parameters found in the translation by the passed params parameters. |
protected java.lang.String |
getTranslation(java.lang.String key)
|
| Methods inherited from class com.xpn.xwiki.web.XWikiMessageTool |
get, get, getDocumentBundle, getDocumentBundleNames, getDocumentBundleProperties, getDocumentBundles, getDocumentBundles |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XWikiPluginMessageTool
public XWikiPluginMessageTool(java.util.Locale locale,
com.xpn.xwiki.plugin.XWikiPluginInterface plugin,
com.xpn.xwiki.XWikiContext context)
- Parameters:
locale - the locale.plugin - the plugin.context - the XWikiContext object, used to get access to XWiki primitives for loading
documents
XWikiPluginMessageTool
public XWikiPluginMessageTool(java.util.ResourceBundle bundle)
- Parameters:
bundle - the default Resource Bundle to fall back to if no document bundle is found when trying to get a key
XWikiPluginMessageTool
public XWikiPluginMessageTool(java.util.ResourceBundle bundle,
com.xpn.xwiki.XWikiContext context)
- Parameters:
bundle - the default Resource Bundle to fall back to if no document bundle is found when trying to get a keycontext - the XWikiContext object, used to get access to XWiki primitives for loading
documents
getTranslation
protected java.lang.String getTranslation(java.lang.String key)
-
Start calling context's XWikiMessageTool.get(String) then if nothing is found use
plugin's ResourceBundle.
- Overrides:
getTranslation in class com.xpn.xwiki.web.XWikiMessageTool
- See Also:
XWikiMessageTool.getTranslation(java.lang.String)
get
public java.lang.String get(java.lang.String key,
java.lang.String[] params)
- Find a translation and then replace any parameters found in the translation by the passed params parameters. The
format is the one used by
MessageFormat.
- Parameters:
key - the key of the string to findparams - the array of parameters to use for replacing "{N}" elements in the string. See
MessageFormat for the full syntax
- Returns:
- the translated string with parameters resolved
- See Also:
XWikiMessageTool.get(String, List)
get
public java.lang.String get(java.lang.String key,
java.lang.String param)
- Find a translation and then replace any parameters found in the translation by the passed param parameter. The
format is the one used by
MessageFormat.
- Parameters:
key - the key of the string to findparam - the parameter to use for replacing "{0}" element in the string. See MessageFormat
for the full syntax
- Returns:
- the translated string with parameters resolved
- See Also:
XWikiMessageTool.get(String, List)
Copyright © 2004-2009 XWiki. All Rights Reserved.