Package com.gengoai

Enum Language

  • All Implemented Interfaces:
    Serializable, Comparable<Language>

    public enum Language
    extends Enum<Language>

    Enumeration of world languages with helpful information on whether or not the language is Whitespace delimited or if language is read right to left (May not be complete).

    Author:
    David B. Bracewell
    • Enum Constant Detail

      • ENGLISH

        public static final Language ENGLISH
        English.
      • JAPANESE

        public static final Language JAPANESE
        Japanese.
      • CHINESE

        public static final Language CHINESE
        Chinese.
      • ABKHAZIAN

        public static final Language ABKHAZIAN
        Abkhazian language.
      • AFAR

        public static final Language AFAR
        Afar language.
      • AFRIKAANS

        public static final Language AFRIKAANS
        Afrikaans language.
      • ALBANIAN

        public static final Language ALBANIAN
        Albanian language.
      • AMHARIC

        public static final Language AMHARIC
        Amharic language.
      • ARABIC

        public static final Language ARABIC
        Arabic.
      • ARMENIAN

        public static final Language ARMENIAN
        Armenian language.
      • ASSAMESE

        public static final Language ASSAMESE
        Assamese language.
      • AYMARA

        public static final Language AYMARA
        Aymara language.
      • AZERBAIJANI

        public static final Language AZERBAIJANI
        Azerbaijani language.
      • BASHKIR

        public static final Language BASHKIR
        Bashkir language.
      • BASQUE

        public static final Language BASQUE
        Basque language.
      • BENGALI

        public static final Language BENGALI
        Bengali language.
      • BHUTANI

        public static final Language BHUTANI
        Bhutani language.
      • BIHARI

        public static final Language BIHARI
        Bihari language.
      • BISLAMA

        public static final Language BISLAMA
        Bislama language.
      • BRETON

        public static final Language BRETON
        Breton language.
      • BULGARIAN

        public static final Language BULGARIAN
        Bulgarian language.
      • BURMESE

        public static final Language BURMESE
        Burmese language.
      • BYELORUSSIAN

        public static final Language BYELORUSSIAN
        Byelorussian language.
      • CAMBODIAN

        public static final Language CAMBODIAN
        Cambodian language.
      • CATALAN

        public static final Language CATALAN
        Catalan language.
      • CORSICAN

        public static final Language CORSICAN
        Corsican language.
      • CROATIAN

        public static final Language CROATIAN
        Croatian language.
      • CZECH

        public static final Language CZECH
        Czech language.
      • DANISH

        public static final Language DANISH
        Danish language.
      • DUTCH

        public static final Language DUTCH
        Dutch language.
      • ESPERANTO

        public static final Language ESPERANTO
        Esperanto language.
      • ESTONIAN

        public static final Language ESTONIAN
        Estonian language.
      • FAEROESE

        public static final Language FAEROESE
        Faeroese language.
      • FIJI

        public static final Language FIJI
        Fiji language.
      • FINNISH

        public static final Language FINNISH
        Finnish language.
      • FRENCH

        public static final Language FRENCH
        French language.
      • FRISIAN

        public static final Language FRISIAN
        Frisian language.
      • GAELIC

        public static final Language GAELIC
        Gaelic language.
      • GALICIAN

        public static final Language GALICIAN
        Galician language.
      • GEORGIAN

        public static final Language GEORGIAN
        Georgian language.
      • GERMAN

        public static final Language GERMAN
        German language.
      • GREEK

        public static final Language GREEK
        Greek language.
      • GREENLANDIC

        public static final Language GREENLANDIC
        Greenlandic language.
      • GUARANI

        public static final Language GUARANI
        Guarani language.
      • GUJARATI

        public static final Language GUJARATI
        Gujarati language.
      • HAUSA

        public static final Language HAUSA
        Hausa language.
      • HEBREW

        public static final Language HEBREW
        Hebrew.
      • HINDI

        public static final Language HINDI
        Hindi language.
      • HUNGARIAN

        public static final Language HUNGARIAN
        Hungarian language.
      • ICELANDIC

        public static final Language ICELANDIC
        Icelandic language.
      • INDONESIAN

        public static final Language INDONESIAN
        Indonesian language.
      • INTERLINGUA

        public static final Language INTERLINGUA
        Interlingua language.
      • INTERLINGUE

        public static final Language INTERLINGUE
        Interlingue language.
      • INUPIAK

        public static final Language INUPIAK
        Inupiak language.
      • IRISH

        public static final Language IRISH
        Irish language.
      • ITALIAN

        public static final Language ITALIAN
        Italian language.
      • JAVANESE

        public static final Language JAVANESE
        Javanese.
      • KANNADA

        public static final Language KANNADA
        Kannada language.
      • KASHMIRI

        public static final Language KASHMIRI
        Kashmiri.
      • KAZAKH

        public static final Language KAZAKH
        Kazakh language.
      • KINYARWANDA

        public static final Language KINYARWANDA
        Kinyarwanda language.
      • KIRGHIZ

        public static final Language KIRGHIZ
        Kirghiz language.
      • KIRUNDI

        public static final Language KIRUNDI
        Kirundi language.
      • KOREAN

        public static final Language KOREAN
        Korean language.
      • KURDISH

        public static final Language KURDISH
        Kurdish.
      • LAOTHIAN

        public static final Language LAOTHIAN
        Laothian language.
      • LATIN

        public static final Language LATIN
        Latin language.
      • LATVIAN

        public static final Language LATVIAN
        Latvian language.
      • LINGALA

        public static final Language LINGALA
        Lingala language.
      • LITHUANIAN

        public static final Language LITHUANIAN
        Lithuanian language.
      • MACEDONIAN

        public static final Language MACEDONIAN
        Macedonian language.
      • MALAGASY

        public static final Language MALAGASY
        Malagasy language.
      • MALAY

        public static final Language MALAY
        Malay.
      • MALAYALAM

        public static final Language MALAYALAM
        Malayalam.
      • MALTESE

        public static final Language MALTESE
        Maltese language.
      • MAORI

        public static final Language MAORI
        Maori language.
      • MARATHI

        public static final Language MARATHI
        Marathi language.
      • MOLDAVIAN

        public static final Language MOLDAVIAN
        Moldavian language.
      • MONGOLIAN

        public static final Language MONGOLIAN
        Mongolian language.
      • NAURU

        public static final Language NAURU
        Nauru language.
      • NEPALI

        public static final Language NEPALI
        Nepali language.
      • NORWEGIAN

        public static final Language NORWEGIAN
        Norwegian language.
      • OCCITAN

        public static final Language OCCITAN
        Occitan language.
      • ORIYA

        public static final Language ORIYA
        Oriya language.
      • OROMO

        public static final Language OROMO
        Oromo language.
      • PASHTO

        public static final Language PASHTO
        Pashto.
      • PERSIAN

        public static final Language PERSIAN
        Persian.
      • POLISH

        public static final Language POLISH
        Polish language.
      • PORTUGUESE

        public static final Language PORTUGUESE
        Portuguese language.
      • PUNJABI

        public static final Language PUNJABI
        Punjabi.
      • QUECHUA

        public static final Language QUECHUA
        Quechua language.
      • ROMANIAN

        public static final Language ROMANIAN
        Romanian language.
      • RUSSIAN

        public static final Language RUSSIAN
        Russian language.
      • SAMOAN

        public static final Language SAMOAN
        Samoan language.
      • SANGRO

        public static final Language SANGRO
        Sangro language.
      • SANSKRIT

        public static final Language SANSKRIT
        Sanskrit language.
      • SERBIAN

        public static final Language SERBIAN
        Serbian language.
      • SERBO_CROATIAN

        public static final Language SERBO_CROATIAN
        Serbo croatian language.
      • SESOTHO

        public static final Language SESOTHO
        Sesotho language.
      • SETSWANA

        public static final Language SETSWANA
        Setswana language.
      • SHONA

        public static final Language SHONA
        Shona language.
      • SINDHI

        public static final Language SINDHI
        Sindhi.
      • SINGHALESE

        public static final Language SINGHALESE
        Singhalese language.
      • SISWATI

        public static final Language SISWATI
        Siswati language.
      • SLOVAK

        public static final Language SLOVAK
        Slovak language.
      • SLOVENIAN

        public static final Language SLOVENIAN
        Slovenian language.
      • SOMALI

        public static final Language SOMALI
        Somali.
      • SPANISH

        public static final Language SPANISH
        Spanish language.
      • SUDANESE

        public static final Language SUDANESE
        Sudanese language.
      • SWAHILI

        public static final Language SWAHILI
        Swahili language.
      • SWEDISH

        public static final Language SWEDISH
        Swedish language.
      • TAGALOG

        public static final Language TAGALOG
        Tagalog language.
      • TAJIK

        public static final Language TAJIK
        Tajik language.
      • TAMIL

        public static final Language TAMIL
        Tamil language.
      • TATAR

        public static final Language TATAR
        Tatar language.
      • TELUGU

        public static final Language TELUGU
        Telugu language.
      • THAI

        public static final Language THAI
        Thai language.
      • TIBETAN

        public static final Language TIBETAN
        Tibetan language.
      • TIGRINYA

        public static final Language TIGRINYA
        Tigrinya language.
      • TONGA

        public static final Language TONGA
        Tonga language.
      • TSONGA

        public static final Language TSONGA
        Tsonga language.
      • TURKISH

        public static final Language TURKISH
        Turkish language.
      • TURKMEN

        public static final Language TURKMEN
        Turkmen.
      • TWI

        public static final Language TWI
        Twi language.
      • UKRAINIAN

        public static final Language UKRAINIAN
        Ukrainian language.
      • URDU

        public static final Language URDU
        Urdu.
      • UZBEK

        public static final Language UZBEK
        Uzbek language.
      • VIETNAMESE

        public static final Language VIETNAMESE
        Vietnamese language.
      • VOLAPUK

        public static final Language VOLAPUK
        Volapuk language.
      • WELSH

        public static final Language WELSH
        Welsh language.
      • WOLOF

        public static final Language WOLOF
        Wolof language.
      • XHOSA

        public static final Language XHOSA
        Xhosa language.
      • YIDDISH

        public static final Language YIDDISH
        Yiddish.
      • YORUBA

        public static final Language YORUBA
        Yoruba language.
      • ZULU

        public static final Language ZULU
        Zulu language.
      • UNKNOWN

        public static final Language UNKNOWN
        Unknown.
    • Method Detail

      • values

        public static Language[] 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 (Language c : Language.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Language 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 Language fromString​(String code)
        Parses a language code to get its corresponding LanguageId
        Parameters:
        code - language code
        Returns:
        parsed language or null
      • fromLocale

        public static Language fromLocale​(Locale locale)
        From locale language.
        Parameters:
        locale - locale
        Returns:
        language language
      • asLocale

        public Locale asLocale()
        Gets language as a Locale
        Returns:
        language locale
      • getCode

        public String getCode()
        Gets language code.
        Returns:
        ISO2 Language code
      • getCollator

        public final Collator getCollator​(int strength,
                                          int decomposition)
        Convenience method for constructing a collator.
        Parameters:
        strength - strength of Collator
        decomposition - decomposition of Collator
        Returns:
        collator collator
      • getCollator

        public final Collator getCollator​(int strength)
        Convenience method for constructing a collator using FULL_DECOMPOSITION
        Parameters:
        strength - strength of Collator
        Returns:
        collator collator
      • getCollator

        public final Collator getCollator()
        Convenience method for constructing a collator using a strength of TERTIARY and decomposition of FULL_DECOMPOSITION
        Returns:
        collator collator
      • getCurrencyFormat

        public NumberFormat getCurrencyFormat()
        Gets currency format.
        Returns:
        currency format
      • getDateFormat

        public DateFormat getDateFormat​(int style)
        Gets date format.
        Parameters:
        style - style
        Returns:
        date format
      • getLocales

        public List<Locale> getLocales()
        Gets locales.
        Returns:
        possible locales associated with language.
      • getNumberFormat

        public NumberFormat getNumberFormat()
        Gets number format.
        Returns:
        number format
      • getPercentFormat

        public NumberFormat getPercentFormat()
        Gets percent format.
        Returns:
        percent format
      • isRightToLeft

        public boolean isRightToLeft()
        Is the language written right to left
        Returns:
        True if language is written right to left
      • join

        public String join​(String[] words)
        Joins the words in the array separating them with a space if the language uses whitespace
        Parameters:
        words - the words to join
        Returns:
        the joined words
      • join

        public String join​(CharSequence[] words)
        Joins the words in the array separating them with a space if the language uses whitespace
        Parameters:
        words - the words to join
        Returns:
        the joined words
      • join

        public String join​(Iterable<? extends CharSequence> words)
        Joins the words in the array separating them with a space if the language uses whitespace
        Parameters:
        words - the words to join
        Returns:
        the joined words
      • usesWhitespace

        public boolean usesWhitespace()
        Does the language use whitespace to separate words
        Returns:
        True if language uses white space to separate words, false if not