|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wiki.i18n.InternationalizationManager
public class InternationalizationManager
Manages all internationalization in JSPWiki.
Field Summary | |
---|---|
static String |
CORE_BUNDLE
The name of the ResourceBundle which contains any and all JSPWiki core resource strings. |
static String |
DEF_TEMPLATE
The name of the ResourceBundle which contains any and all JSPWiki default templates resource strings. |
Constructor Summary | |
---|---|
InternationalizationManager(WikiEngine engine)
Constructs a new InternationalizationManager. |
Method Summary | |
---|---|
String |
get(String key)
Returns a String from the CORE_BUNDLE using English as the default locale. |
String |
get(String bundle,
Locale locale,
String key)
If you are too lazy to open your own bundle, use this method to get a string simply from a bundle. |
String |
get(String bundle,
Locale locale,
String key,
Object... args)
Obtain a parameterized String from the bundle. |
ResourceBundle |
getBundle(String bundle,
Locale locale)
Finds a resource bundle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CORE_BUNDLE
public static final String DEF_TEMPLATE
Constructor Detail |
---|
public InternationalizationManager(WikiEngine engine)
engine
- To which engine this belongs toMethod Detail |
---|
public String get(String key) throws MissingResourceException
key
- Key to find
MissingResourceException
- If there is no such keypublic ResourceBundle getBundle(String bundle, Locale locale) throws MissingResourceException
bundle
- The ResourceBundle to find. Must exist.locale
- The Locale to use. Set to null to get the default locale.
MissingResourceException
- If the key cannot be located at all, even from the default locale.public String get(String bundle, Locale locale, String key) throws MissingResourceException
bundle
- Which bundle the string is inlocale
- Locale to use - null for defaultkey
- Which key to use.
MissingResourceException
- If the key cannot be located at all, even from the default locale.public String get(String bundle, Locale locale, String key, Object... args) throws MissingResourceException
bundle
- Which bundle the string is inlocale
- Locale to use - null for defaultkey
- Which key to use.args
- parameters to insert in the String.
MissingResourceException
- If the key cannot be located at all, even from the default locale.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |