public class

LocaleUtils

extends Object
java.lang.Object
   ↳ com.neomades.util.LocaleUtils

Class Overview

The language codes are two-letter lowercase ISO language codes (such as "en") as defined by ISO 639-1. The country codes are two-letter uppercase ISO country codes (such as "US") as defined by ISO 3166-1. The variant codes are unspecified.

Summary

Public Constructors
LocaleUtils()
Public Methods
synchronized static String[] getAvailableLocales()
Returns the system's installed locales.
static String getDefault()
Returns the user's preferred locale.
static String[] getISOCountries()
Returns an array of strings containing all the two-letter ISO country codes that can be used as the country code.
static String[] getISOlanguages()
Returns an array of strings containing all the two-letter ISO language codes that can be used as the language code.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LocaleUtils ()

Public Methods

public static synchronized String[] getAvailableLocales ()

Returns the system's installed locales.

Returns
  • the system's installed locales.

public static String getDefault ()

Returns the user's preferred locale.

Returns
  • the user's preferred locale.

public static String[] getISOCountries ()

Returns an array of strings containing all the two-letter ISO country codes that can be used as the country code.

Returns
  • all the two-letter ISO country codes

public static String[] getISOlanguages ()

Returns an array of strings containing all the two-letter ISO language codes that can be used as the language code.

Returns
  • all the two-letter ISO language codes