public class LanguageResourceBundle extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
LanguageResourceBundle.UTF8Control |
Modifier and Type | Field and Description |
---|---|
private static String |
baseName
ResourceBundle base name
|
protected static String |
BUNDLE_EXTENSION |
private Map<Locale,ResourceBundle> |
resourceBundles
Map of resource bundles by locale
|
protected static ResourceBundle.Control |
UTF8_CONTROL |
Constructor and Description |
---|
LanguageResourceBundle(String resourcePath)
Constructor; takes a
baseName of the message properties
files. |
Modifier and Type | Method and Description |
---|---|
ResourceBundle |
getBundle(Locale locale)
Lookup a bundle for the
locale . |
String |
getMessage(String key,
Locale locale) |
String |
getMessage(String key,
Object[] args,
Locale locale) |
protected static final String BUNDLE_EXTENSION
protected static ResourceBundle.Control UTF8_CONTROL
private transient Map<Locale,ResourceBundle> resourceBundles
private static final String baseName
public LanguageResourceBundle(String resourcePath)
baseName
of the message properties
files.baseName
- base name of message properties, e.g.
messages/Resources
public ResourceBundle getBundle(Locale locale)
locale
. If a resource bundle has
been loaded already, the "cached" instance is returned; otherwise the
bundle is loaded.locale
- requested localeCopyright © 2014 Gentics Software GmbH. All Rights Reserved.