|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface I18n
Common interface for i18n various i18n implementations.
| Method Summary | |
|---|---|
boolean |
defined(Locale locale,
String key)
Checks if a string value is defined for a given locale. |
boolean |
defined(String key)
Checks if a string value is defined for a default locale. |
String |
get(Locale locale,
String key)
Get the string value. |
String |
get(Locale locale,
String key,
List<String> values)
Get the string and replace $[1..n] variables with given values. |
String |
get(Locale locale,
String key,
String... values)
Get the string and replace $[1..n] variables with given values. |
String |
get(Locale locale,
String key,
String defaultValue)
Get the string value with given default value if the string is missing in both given and default locale. |
Locale |
getDefaultLocale()
Returns configured default locale. |
Collection<String> |
getKeys(Locale locale)
Get all keys defined for given locale. |
String |
getLocaleName(Locale locale)
Returns the human readable name of the given locale. |
Locale |
getPreferedLocale()
Returns configured prefered locale. |
Locale[] |
getSupportedLocales()
Returns configured locales. |
void |
reload()
Reload the localization. |
| Method Detail |
|---|
Locale getDefaultLocale()
Locale getPreferedLocale()
Locale[] getSupportedLocales()
String getLocaleName(Locale locale)
locale - the locale.
boolean defined(String key)
key - the key.
true if the string is defined
boolean defined(Locale locale,
String key)
locale - the locale.key - the key.
true if the string is defined
String get(Locale locale,
String key)
locale - the locale.key - the key.
String get(Locale locale,
String key,
String defaultValue)
locale - the locale.key - the key.defaultValue - the default value in case key mapping is missing.
String get(Locale locale,
String key,
String... values)
locale - the locale.key - the key.values - the values use for substitution.
String get(Locale locale,
String key,
List<String> values)
locale - the locale.key - the key.values - the values use for substitution.
Collection<String> getKeys(Locale locale)
locale - the locale.
void reload()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||