public class DefaultLocaleManager extends Object implements LocaleManager
ENGLISH, SPANISH
Constructor and Description |
---|
DefaultLocaleManager() |
Modifier and Type | Method and Description |
---|---|
Locale |
getCurrentLocale() |
Set<Locale> |
getDefaultLocales() |
Locale |
getDefaultSystemLocale() |
Set<Locale> |
getInstalledLocales() |
String |
getLanguageDisplayName(Locale locale) |
Locale[] |
getLocaleAlternatives(Locale locale) |
String |
getLocaleDisplayName(Locale locale) |
Locale |
getNearestLocale(Locale locale) |
File |
getResourcesFolder() |
boolean |
installLocale(Locale locale) |
boolean |
installLocales(URL localesFile) |
void |
setCurrentLocale(Locale locale) |
boolean |
uninstallLocale(Locale locale) |
public Locale getCurrentLocale()
getCurrentLocale
in interface LocaleManager
public void setCurrentLocale(Locale locale)
setCurrentLocale
in interface LocaleManager
public Locale getDefaultSystemLocale()
getDefaultSystemLocale
in interface LocaleManager
public Set<Locale> getDefaultLocales()
getDefaultLocales
in interface LocaleManager
public boolean installLocales(URL localesFile)
installLocales
in interface LocaleManager
public Set<Locale> getInstalledLocales()
getInstalledLocales
in interface LocaleManager
public boolean installLocale(Locale locale)
installLocale
in interface LocaleManager
public boolean uninstallLocale(Locale locale)
uninstallLocale
in interface LocaleManager
public String getLanguageDisplayName(Locale locale)
getLanguageDisplayName
in interface LocaleManager
public String getLocaleDisplayName(Locale locale)
getLocaleDisplayName
in interface LocaleManager
public Locale[] getLocaleAlternatives(Locale locale)
getLocaleAlternatives
in interface LocaleManager
public File getResourcesFolder()
getResourcesFolder
in interface LocaleManager
public Locale getNearestLocale(Locale locale)
getNearestLocale
in interface LocaleManager