Package org.apache.wiki.i18n
Interface InternationalizationManager
- All Known Implementing Classes:
DefaultInternationalizationManager
public interface InternationalizationManager
Manages all internationalization in JSPWiki.
- Since:
- 2.6
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
Returns a String from the CORE_BUNDLE using English as the default locale.default String
If you are too lazy to open your own bundle, use this method to get a string simply from a bundle.default String
Obtain a parameterized String from the bundle.default ResourceBundle
Finds a resource bundle.
-
Field Details
-
CORE_BUNDLE
The name of the ResourceBundle which contains any and all JSPWiki core resource strings. It's value is "CoreResources".- See Also:
-
DEF_TEMPLATE
The name of the ResourceBundle which contains any and all JSPWiki default templates resource strings. It's value is "templates.default".- See Also:
-
-
Method Details
-
get
Returns a String from the CORE_BUNDLE using English as the default locale.- Parameters:
key
- Key to find- Returns:
- The English string
- Throws:
MissingResourceException
- If there is no such key
-
getBundle
Finds a resource bundle.- Parameters:
bundle
- The ResourceBundle to find. Must exist.locale
- The Locale to use. Set to null to get the default locale.- Returns:
- A localized string
- Throws:
MissingResourceException
- If the key cannot be located at all, even from the default locale.
-
get
If you are too lazy to open your own bundle, use this method to get a string simply from a bundle.- Parameters:
bundle
- Which bundle the string is inlocale
- Locale to use - null for defaultkey
- Which key to use.- Returns:
- A localized string (or from the default language, if not found)
- Throws:
MissingResourceException
- If the key cannot be located at all, even from the default locale.
-
get
default String get(String bundle, Locale locale, String key, Object... args) throws MissingResourceException Obtain a parameterized String from the bundle.- Parameters:
bundle
- Which bundle the string is inlocale
- Locale to use - null for defaultkey
- Which key to use.args
- parameters to insert in the String.- Returns:
- A localized string (or from the default language, if not found)
- Throws:
MissingResourceException
- If the key cannot be located at all, even from the default locale.
-