|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ecyrd.jspwiki.i18n.InternationalizationManager
com.ecyrd.jspwiki.i18n.SilverpeasWikiInternationalizationManager
public class SilverpeasWikiInternationalizationManager
Manages all internationalization in JSPWiki.
Field Summary |
---|
Fields inherited from class com.ecyrd.jspwiki.i18n.InternationalizationManager |
---|
CORE_BUNDLE |
Constructor Summary | |
---|---|
SilverpeasWikiInternationalizationManager(com.ecyrd.jspwiki.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. |
ResourceBundle |
getBundle(String bundle,
Locale locale)
Finds a resource bundle. |
static Locale |
getLocale()
|
static void |
setPreferredLanguage(String newLanguage)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SilverpeasWikiInternationalizationManager(com.ecyrd.jspwiki.WikiEngine engine)
engine
- To which engine this belongs toMethod Detail |
---|
public static void setPreferredLanguage(String newLanguage)
public static Locale getLocale()
public String get(String key) throws MissingResourceException
get
in class com.ecyrd.jspwiki.i18n.InternationalizationManager
key
- Key to find
MissingResourceException
- If there is no such keypublic ResourceBundle getBundle(String bundle, Locale locale) throws MissingResourceException
getBundle
in class com.ecyrd.jspwiki.i18n.InternationalizationManager
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
get
in class com.ecyrd.jspwiki.i18n.InternationalizationManager
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |