com.memetix.mst.language
Enum SpokenDialect

java.lang.Object
  extended by java.lang.Enum<SpokenDialect>
      extended by com.memetix.mst.language.SpokenDialect
All Implemented Interfaces:
Serializable, Comparable<SpokenDialect>

public enum SpokenDialect
extends Enum<SpokenDialect>

SpokenLanguage - an enum of all spoken language codes supported by the Microsoft Translator API for the Speak Service Uses the AJAX Interface V2 - see: http://msdn.microsoft.com/en-us/library/ff512399.aspx

Author:
Jonathan Griggs

Enum Constant Summary
CATALAN_SPAIN
           
CHINESE_SIMPLIFIED_PEOPLES_REPUBLIC_OF_CHINA
           
CHINESE_TRADITIONAL_HONG_KONG_SAR
           
CHINESE_TRADITIONAL_TAIWAN
           
DANISH_DENMARK
           
DUTCH_NETHERLANDS
           
ENGLISH_AUSTRALIA
           
ENGLISH_CANADA
           
ENGLISH_INDIA
           
ENGLISH_UNITED_KINGDOM
           
ENGLISH_UNITED_STATES
           
FINNISH_FINLAND
           
FRENCH_CANADA
           
FRENCH_FRANCE
           
GERMAN_GERMANY
           
ITALIAN_ITALY
           
JAPANESE_JAPAN
           
KOREAN_KOREA
           
NORWEGIAN_NORWAY
           
POLISH_POLAND
           
PORTUGUESE_BRAZIL
           
PORTUGUESE_PORTUGAL
           
RUSSIAN_RUSSIA
           
SPANISH_MEXICO
           
SPANISH_SPAIN
           
SWEDISH_SWEDEN
           
 
Method Summary
static void flushNameCache()
           
static SpokenDialect fromString(String pLanguage)
           
 String getName(Language locale)
          getName() 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.
static void setClientId(String pId)
           
static void setClientSecret(String pSecret)
           
static void setKey(String pKey)
           
 String toString()
          Returns the String representation of this language.
static SpokenDialect valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SpokenDialect[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CATALAN_SPAIN

public static final SpokenDialect CATALAN_SPAIN

DANISH_DENMARK

public static final SpokenDialect DANISH_DENMARK

GERMAN_GERMANY

public static final SpokenDialect GERMAN_GERMANY

ENGLISH_AUSTRALIA

public static final SpokenDialect ENGLISH_AUSTRALIA

ENGLISH_CANADA

public static final SpokenDialect ENGLISH_CANADA

ENGLISH_UNITED_KINGDOM

public static final SpokenDialect ENGLISH_UNITED_KINGDOM

ENGLISH_INDIA

public static final SpokenDialect ENGLISH_INDIA

ENGLISH_UNITED_STATES

public static final SpokenDialect ENGLISH_UNITED_STATES

SPANISH_SPAIN

public static final SpokenDialect SPANISH_SPAIN

SPANISH_MEXICO

public static final SpokenDialect SPANISH_MEXICO

FINNISH_FINLAND

public static final SpokenDialect FINNISH_FINLAND

FRENCH_CANADA

public static final SpokenDialect FRENCH_CANADA

FRENCH_FRANCE

public static final SpokenDialect FRENCH_FRANCE

ITALIAN_ITALY

public static final SpokenDialect ITALIAN_ITALY

JAPANESE_JAPAN

public static final SpokenDialect JAPANESE_JAPAN

KOREAN_KOREA

public static final SpokenDialect KOREAN_KOREA

NORWEGIAN_NORWAY

public static final SpokenDialect NORWEGIAN_NORWAY

DUTCH_NETHERLANDS

public static final SpokenDialect DUTCH_NETHERLANDS

POLISH_POLAND

public static final SpokenDialect POLISH_POLAND

PORTUGUESE_BRAZIL

public static final SpokenDialect PORTUGUESE_BRAZIL

PORTUGUESE_PORTUGAL

public static final SpokenDialect PORTUGUESE_PORTUGAL

RUSSIAN_RUSSIA

public static final SpokenDialect RUSSIAN_RUSSIA

SWEDISH_SWEDEN

public static final SpokenDialect SWEDISH_SWEDEN

CHINESE_SIMPLIFIED_PEOPLES_REPUBLIC_OF_CHINA

public static final SpokenDialect CHINESE_SIMPLIFIED_PEOPLES_REPUBLIC_OF_CHINA

CHINESE_TRADITIONAL_HONG_KONG_SAR

public static final SpokenDialect CHINESE_TRADITIONAL_HONG_KONG_SAR

CHINESE_TRADITIONAL_TAIWAN

public static final SpokenDialect CHINESE_TRADITIONAL_TAIWAN
Method Detail

values

public static SpokenDialect[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SpokenDialect c : SpokenDialect.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SpokenDialect valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

fromString

public static SpokenDialect fromString(String pLanguage)

toString

public String toString()
Returns the String representation of this language.

Overrides:
toString in class Enum<SpokenDialect>
Returns:
The String representation of this language.

setKey

public static void setKey(String pKey)

setClientId

public static void setClientId(String pId)

setClientSecret

public static void setClientSecret(String pSecret)

getName

public String getName(Language locale)
               throws Exception
getName() 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.

Returns:
The String representation of this language's localized Name.
Throws:
Exception

flushNameCache

public static void flushNameCache()


Copyright © 2012. All Rights Reserved.