org.openstreetmap.josm.tools
Class LanguageInfo

java.lang.Object
  extended by org.openstreetmap.josm.tools.LanguageInfo

public class LanguageInfo
extends java.lang.Object


Constructor Summary
LanguageInfo()
           
 
Method Summary
static java.lang.String getJOSMLocaleCode()
          Replies the JOSM locale code for the default locale.
static java.lang.String getJOSMLocaleCode(java.util.Locale locale)
          Replies the locale code used by JOSM for a given locale.
static java.lang.String getLanguageCodeManifest()
           
static java.lang.String getLanguageCodeXML()
           
static java.util.Locale getLocale(java.lang.String localeName)
          Replies the locale code used by Java for a given locale.
static java.lang.String getWikiLanguagePrefix()
          Replies the wiki language prefix for the current locale.
static java.lang.String getWikiLanguagePrefix(java.util.Locale locale)
          Replies the wiki language prefix for the given locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageInfo

public LanguageInfo()
Method Detail

getWikiLanguagePrefix

public static java.lang.String getWikiLanguagePrefix(java.util.Locale locale)
Replies the wiki language prefix for the given locale. The wiki language prefix has the form 'Xy:' where 'Xy' is a ISO 639 language code in title case.

Parameters:
locale - the locale
Returns:
the wiki language prefix

getWikiLanguagePrefix

public static java.lang.String getWikiLanguagePrefix()
Replies the wiki language prefix for the current locale.

Returns:
the wiki language prefix
See Also:
Locale.getDefault(), getWikiLanguagePrefix(Locale)

getJOSMLocaleCode

public static java.lang.String getJOSMLocaleCode()
Replies the JOSM locale code for the default locale.

Returns:
the JOSM locale code for the default locale
See Also:
getJOSMLocaleCode(Locale)

getJOSMLocaleCode

public static java.lang.String getJOSMLocaleCode(java.util.Locale locale)
Replies the locale code used by JOSM for a given locale. In most cases JOSM uses the 2-character ISO 639 language code (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().

Parameters:
locale - the locale. Replies "en" if null.
Returns:
the JOSM code for the given locale

getLocale

public static java.util.Locale getLocale(java.lang.String localeName)
Replies the locale code used by Java for a given locale. In most cases JOSM and Java uses the same codes, but for some exceptions this is needed.

Parameters:
localeName - the locale code.
Returns:
the resulting locale

getLanguageCodeXML

public static java.lang.String getLanguageCodeXML()

getLanguageCodeManifest

public static java.lang.String getLanguageCodeManifest()


JOSM