public final class LanguageInfo extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LanguageInfo.LocaleType
Type of the locale to use
|
Modifier | Constructor and Description |
---|---|
private |
LanguageInfo() |
Modifier and Type | Method and Description |
---|---|
static String |
getJOSMLocaleCode()
Replies the JOSM locale code for the default locale.
|
static String |
getJOSMLocaleCode(Locale locale)
Replies the locale code used by JOSM for a given locale.
|
static String |
getLanguageCodeManifest() |
static String |
getLanguageCodeXML() |
static Locale |
getLocale(String localeName)
Replies the locale code used by Java for a given locale.
|
static String |
getWikiLanguagePrefix()
Replies the wiki language prefix for the current locale.
|
static String |
getWikiLanguagePrefix(LanguageInfo.LocaleType type)
Replies the wiki language prefix for the given locale.
|
private LanguageInfo()
public static String getWikiLanguagePrefix(LanguageInfo.LocaleType type)
type
- the typenull
for LanguageInfo.LocaleType.BASELANGUAGE
, when
base language is identical to default or englishpublic static String getWikiLanguagePrefix()
Locale.getDefault()
,
getWikiLanguagePrefix(LocaleType)
public static String getJOSMLocaleCode()
getJOSMLocaleCode(Locale)
public static String getJOSMLocaleCode(Locale locale)
Locale.getLanguage()
to identify the locale of a localized resource, but in some cases it may use the
programmatic name for locales, as replied by Locale.toString()
.locale
- the locale. Replies "en" if null.public static Locale getLocale(String localeName)
localeName
- the locale code.public static String getLanguageCodeXML()
public static String getLanguageCodeManifest()