@Singleton public class LanguageManager extends Object implements LanguageManagerInterface
| Constructor and Description |
|---|
LanguageManager()
A basic constructor which will automatically load english and MessageBundle File.
|
| Modifier and Type | Method and Description |
|---|---|
Locale |
getCurrentLocale()
Get the current locale, loaded with loadLocale.
|
Locale |
getLocale() |
ResourceBundle |
getResourceBundle() |
String |
getString(String label)
Get the localized string corresponding to the label.
|
String |
getString(String label,
String... params)
Get the localized string corresponding to the label and format it with the parameters.
|
Locale |
loadLocale(String region,
String country)
Load the locale corresponding to the region and the country and store it in the object.
|
public LanguageManager()
public Locale loadLocale(String region, String country)
LanguageManagerInterfaceloadLocale in interface LanguageManagerInterfaceregion - the locale's regioncountry - the locale's countrypublic String getString(String label, String... params)
LanguageManagerInterfacegetString in interface LanguageManagerInterfacelabel - the label to findparams - the parameters used to format the localized stringpublic Locale getCurrentLocale()
LanguageManagerInterfacegetCurrentLocale in interface LanguageManagerInterfacepublic String getString(String label)
LanguageManagerInterfacegetString in interface LanguageManagerInterfacelabel - the label to findpublic Locale getLocale()
public ResourceBundle getResourceBundle()
Copyright © 2016. All Rights Reserved.