public class LanguageMapper extends AbstractISOCodeMapper
JAPMessages
,
http://www.w3.org/WAI/ER/IG/ert/iso639.htm
Modifier and Type | Field and Description |
---|---|
private java.util.Locale |
m_locale |
private static java.lang.String[] |
ms_languageCodes |
private static java.lang.String |
MSG_CHOOSE_LANGUAGE |
Constructor and Description |
---|
LanguageMapper()
Constructs an empty LanguageMapper object.
|
LanguageMapper(int a_maxTextLength)
Constructs an empty LanguageMapper object.
|
LanguageMapper(java.lang.String a_ISOCode)
Constructs a new LanguageMapper that uses the default Locale to
translate its language code.
|
LanguageMapper(java.lang.String a_ISOCode,
int a_maxTextLength)
Constructs a new LanguageMapper that uses the default Locale to
translate its language code.
|
LanguageMapper(java.lang.String a_ISOCode,
int a_maxTextLength,
java.util.Locale a_locale)
Constructs a new LanguageMapper that uses a specific Locale to
translate its language code.
|
LanguageMapper(java.lang.String a_ISOCode,
java.util.Locale a_locale)
Constructs a new LanguageMapper that uses a specific Locale to
translate its language code.
|
Modifier and Type | Method and Description |
---|---|
private void |
createLocale()
Creates the internal Locale object from the language code.
|
protected java.lang.String |
getChooseMessage()
Returns a message that is displayed when this mapped object has an empty ISO code.
|
protected java.lang.String |
getJRETransaltionOfISOCode(java.lang.String a_ISOLanguageCode,
java.util.Locale a_locale) |
java.util.Locale |
getLocale()
Returns a Locale object constructed from the language code.
|
java.util.Locale |
getLocale(java.lang.String a_countryCode)
Creates a Locale object from the language code and a given country code.
|
static java.util.Vector |
getLocalisedLanguages()
Returns a Vector with LanguageMappers for all officially assigned
language codes.
|
static java.util.Vector |
getLocalisedLanguages(int a_maxTextLength)
Returns a Vector with LanguageMappers for all officially assigned
language codes.
|
static java.util.Vector |
getLocalisedLanguages(int a_maxTextLength,
java.util.Locale a_loc)
Returns a Vector with LanguageMappers for all officially assigned
language codes.
|
static java.util.Vector |
getLocalisedLanguages(java.util.Locale a_loc)
Returns a Vector with LanguageMappers for all officially assigned
language codes.
|
equals, getISOCode, hashCode, toString
private static final java.lang.String[] ms_languageCodes
private static final java.lang.String MSG_CHOOSE_LANGUAGE
private java.util.Locale m_locale
public LanguageMapper()
public LanguageMapper(int a_maxTextLength)
a_maxTextLength
- the maximum length of the toString() outputpublic LanguageMapper(java.lang.String a_ISOCode, int a_maxTextLength) throws java.lang.IllegalArgumentException
a_ISOCode
- a two-letter language codea_maxTextLength
- the maximum length of the toString() outputjava.lang.IllegalArgumentException
getLocalisedCountries(int)
public LanguageMapper(java.lang.String a_ISOCode) throws java.lang.IllegalArgumentException
a_ISOCode
- a two-letter language codejava.lang.IllegalArgumentException
getLocalisedCountries(int)
public LanguageMapper(java.lang.String a_ISOCode, java.util.Locale a_locale) throws java.lang.IllegalArgumentException
a_ISOCode
- a two-letter language codea_locale
- a Localejava.lang.IllegalArgumentException
getLocalisedCountries(int, Locale)
public LanguageMapper(java.lang.String a_ISOCode, int a_maxTextLength, java.util.Locale a_locale) throws java.lang.IllegalArgumentException
a_ISOCode
- a two-letter language codea_locale
- a Localea_maxTextLength
- the maximum length of the toString() outputjava.lang.IllegalArgumentException
getLocalisedCountries(int, Locale)
public java.util.Locale getLocale()
public java.util.Locale getLocale(java.lang.String a_countryCode)
a_countryCode
- an ISO country codeCountryMapper
public static java.util.Vector getLocalisedLanguages()
public static java.util.Vector getLocalisedLanguages(java.util.Locale a_loc)
a_loc
- the locale that is used in all contructed LanguageMapperspublic static java.util.Vector getLocalisedLanguages(int a_maxTextLength)
a_maxTextLength
- the maximum length of the toString() outputpublic static java.util.Vector getLocalisedLanguages(int a_maxTextLength, java.util.Locale a_loc)
a_loc
- the locale that is used in all constructed LanguageMappersa_maxTextLength
- the maximum length of the toString() outputprotected final java.lang.String getChooseMessage()
AbstractISOCodeMapper
getChooseMessage
in class AbstractISOCodeMapper
protected java.lang.String getJRETransaltionOfISOCode(java.lang.String a_ISOLanguageCode, java.util.Locale a_locale)
getJRETransaltionOfISOCode
in class AbstractISOCodeMapper
private void createLocale()
Copyright © 2023. All rights reserved.