Class Language

  • public class Language
    extends Object
    Implements a wrapper around a locale that supports different codes for country and language. This is mostly used as workaround for language trees that don't follow the same format for locales in java.util.Locale.
    • Constructor Detail

      • Language

        public Language​(Locale locale)
      • Language

        public Language​(String code)
      • Language

        public Language​(String language,
                        String country)
    • Method Detail

      • getLocale

        public Locale getLocale()
      • getLanguageCode

        public String getLanguageCode()
      • getCountryCode

        public String getCountryCode()
      • getLocale

        public static Locale getLocale​(String code)
        Parses a language code such as "de", "de_CH", "de_DE_EURO" or "de-CH" and returns the proper Locale object.
        code - language code
        locale object