public interface I18N
Basic idea: UI messages are available by specifying 2 values:
(a) The ISO 639-1 language code, as a String ("en", "fr", "ja" etc)
(b) A key for the message. For example, "index.home.title" or "histogram.nav.home"
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultLanguage()
Get the currently set default language as an ISO 639-1 code
|
java.lang.String |
getMessage(java.lang.String key)
Get the specified message in the default language (according to
getDefaultLanguage() |
java.lang.String |
getMessage(java.lang.String langCode,
java.lang.String key)
Get the specified message for the specified language
|
void |
setDefaultLanguage(java.lang.String langCode)
Set the default language
|
java.lang.String getMessage(java.lang.String key)
getDefaultLanguage()
key
- Key valuejava.lang.String getMessage(java.lang.String langCode, java.lang.String key)
langCode
- ISO 639-1 language code: "en", "ja", etckey
- Key value for the message to retrievejava.lang.String getDefaultLanguage()
void setDefaultLanguage(java.lang.String langCode)
langCode
- Language code, as an ISO 639-1 code