public enum Language extends java.lang.Enum<Language>
Uses the AJAX Interface V2 - see: http://msdn.microsoft.com/en-us/library/ff512399.aspx
| Enum Constant and Description |
|---|
ARABIC |
AUTO_DETECT |
BULGARIAN |
CATALAN |
CHINESE_SIMPLIFIED |
CHINESE_TRADITIONAL |
CZECH |
DANISH |
DUTCH |
ENGLISH |
ESTONIAN |
FINNISH |
FRENCH |
GERMAN |
GREEK |
HAITIAN_CREOLE |
HEBREW |
HINDI |
HMONG_DAW |
HUNGARIAN |
INDONESIAN |
ITALIAN |
JAPANESE |
KOREAN |
LATVIAN |
LITHUANIAN |
MALAY |
NORWEGIAN |
PERSIAN |
POLISH |
PORTUGUESE |
ROMANIAN |
RUSSIAN |
SLOVAK |
SLOVENIAN |
SPANISH |
SWEDISH |
THAI |
TURKISH |
UKRAINIAN |
URDU |
VIETNAMESE |
| Modifier and Type | Method and Description |
|---|---|
static void |
flushNameCache() |
static Language |
fromString(java.lang.String pLanguage) |
static java.util.List<java.lang.String> |
getLanguageCodesForTranslation() |
java.lang.String |
getName(Language locale)
getName()
|
static void |
resetToken() |
static void |
setKey(java.lang.String pKey) |
static void |
setSubscriptionKey(java.lang.String pSubscriptionKey) |
java.lang.String |
toString()
Returns the String representation of this language.
|
static Language |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Language[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static java.util.Map<java.lang.String,Language> |
values(Language locale)
values(Language locale)
|
public static final Language AUTO_DETECT
public static final Language ARABIC
public static final Language BULGARIAN
public static final Language CATALAN
public static final Language CHINESE_SIMPLIFIED
public static final Language CHINESE_TRADITIONAL
public static final Language CZECH
public static final Language DANISH
public static final Language DUTCH
public static final Language ENGLISH
public static final Language ESTONIAN
public static final Language FINNISH
public static final Language FRENCH
public static final Language GERMAN
public static final Language GREEK
public static final Language HAITIAN_CREOLE
public static final Language HEBREW
public static final Language HINDI
public static final Language HMONG_DAW
public static final Language HUNGARIAN
public static final Language INDONESIAN
public static final Language ITALIAN
public static final Language JAPANESE
public static final Language KOREAN
public static final Language LATVIAN
public static final Language LITHUANIAN
public static final Language MALAY
public static final Language NORWEGIAN
public static final Language PERSIAN
public static final Language POLISH
public static final Language PORTUGUESE
public static final Language ROMANIAN
public static final Language RUSSIAN
public static final Language SLOVAK
public static final Language SLOVENIAN
public static final Language SPANISH
public static final Language SWEDISH
public static final Language THAI
public static final Language TURKISH
public static final Language UKRAINIAN
public static final Language URDU
public static final Language VIETNAMESE
public static Language[] values()
for (Language c : Language.values()) System.out.println(c);
public static Language valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static Language fromString(java.lang.String pLanguage)
public java.lang.String toString()
toString in class java.lang.Enum<Language>public static void setKey(java.lang.String pKey)
public static void setSubscriptionKey(java.lang.String pSubscriptionKey)
public static void resetToken()
public java.lang.String getName(Language locale) throws java.lang.Exception
Returns the name for this language in the tongue of the specified locale
If the name is not cached, then it retrieves the name of ALL languages in this locale. This is not bad behavior for 2 reasons:
1) We can make a reasonable assumption that the client will request the name of another language in the same locale 2) The GetLanguageNames service call expects an array and therefore we can retrieve ALL names in the same, single call anyway.
java.lang.Exceptionpublic static java.util.List<java.lang.String> getLanguageCodesForTranslation()
throws java.lang.Exception
java.lang.Exceptionpublic static java.util.Map<java.lang.String,Language> values(Language locale) throws java.lang.Exception
Returns a map of all languages, keyed and sorted by the localized name in the tongue of the specified locale
It returns a map, sorted alphanumerically by the keys()
Key: The localized language name Value: The Language instance
locale - The Language we should localize the Language names withjava.lang.Exceptionpublic static void flushNameCache()