@Deprecated public class BasicImmutablesNLS extends NLS
[header]_locales
contains the list of available locales.[header]_[locale]
.
<immutables name="NLS_TEST objects">
<array id="test_locales" type="java.lang.String[]" length="2">
<elem value="lang1"/>
<elem value="lang2"/>
</array>
<array id="test_lang1" type="java.lang.String[]" length="4">
<elem value="LANG1"/>
<elem value="lang1_m1"/>
<elem value="lang1_m2"/>
<elem value="lang1_m3"/>
</array>
<array id="test_lang2" type="java.lang.String[]" length="4">
<elem value="LANG2"/>
<elem value="lang2_m1"/>
<elem value="lang2_m2"/>
<elem value="lang2_m3"/>
</array>
</immutables>
Immutables
Constructor and Description |
---|
BasicImmutablesNLS(String header)
Deprecated.
Creates a BasicImmutablesNLS instance specifying the header.
The first locale is set as current. |
Modifier and Type | Method and Description |
---|---|
String[] |
getAvailableLocales()
Deprecated.
Gets the list of available locales.
|
String |
getCurrentLocale()
Deprecated.
Gets the current loaded locale.
|
String |
getDisplayName(String locale)
Deprecated.
Gets the human-readable name of the given locale.
|
String |
getMessage(int messageID)
Deprecated.
Gets the message matching the specified ID in the current language.
|
String |
getMessage(int messageID,
String locale)
Deprecated.
Gets the message matching the specified ID in the specified locale.
|
void |
setCurrentLocale(String locale)
Deprecated.
Changes the current locale loaded.
|
getDefault, instantiate
public BasicImmutablesNLS(String header)
header
- the header of the immutablespublic String[] getAvailableLocales()
NLS
getAvailableLocales
in class NLS
public String getDisplayName(String locale)
NLS
getDisplayName
in class NLS
locale
- the localepublic void setCurrentLocale(String locale)
NLS
setCurrentLocale
in class NLS
locale
- the locale to setpublic String getCurrentLocale()
NLS
getCurrentLocale
in class NLS
public String getMessage(int messageID)
NLS
getMessage
in class NLS
messageID
- the ID of the message to retrievepublic String getMessage(int messageID, String locale)
getMessage
in class NLS
messageID
- the ID of the message to retrievelocale
- the locale to useNoSuchElementException
- if the immutable [header]_[locale]
does not existArrayIndexOutOfBoundsException
- if the given messageID does not match a valid message