|
Dashboard Builder Commons 6.1.0.CR1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dashboard.LocaleManager
@ApplicationScoped @Named(value="localeManager") public class LocaleManager
Manager that holds the list of languages supported.
| Field Summary | |
|---|---|
protected String |
defaultLocaleId
The default localeId. |
protected String[] |
installedLocaleIds
The list of locales supported. |
| Constructor Summary | |
|---|---|
LocaleManager()
|
|
| Method Summary | |
|---|---|
static String |
currentLang()
Static getter for current lang. |
static Locale |
currentLocale()
Static getter for current Locale. |
String[] |
getAllLanguages()
Get all language identifiers |
Locale[] |
getAllLocales()
Locales supported by the VM |
ResourceBundle |
getBundle(String baseName)
================================================================== BZ-1031080: RESOURCE BUNDLE CUSTOM HANDLING Use another NoFallbackControl implementation than the default one |
ResourceBundle |
getBundle(String baseName,
Locale targetLocale)
|
ResourceBundle |
getBundle(String baseName,
Locale targetLocale,
ClassLoader loader)
|
String |
getCurrentEditLang()
Get the language in which the system is editing contents. |
Locale |
getCurrentEditLocale()
Current locale for editing contents |
String |
getCurrentLang()
Get the current language for displaying contents |
Locale |
getCurrentLocale()
Current locale for viewing contents |
String |
getDefaultLang()
Get the default language for the platform |
Locale |
getDefaultLocale()
Default locale for the application |
String |
getDefaultLocaleId()
|
String[] |
getInstalledLocaleIds()
|
String[] |
getLangs()
Langs supported. |
Locale |
getLocaleById(String localeId)
Get a Locale by its id. |
String[] |
getPlatformAvailableLangs()
Langs supported. |
Locale[] |
getPlatformAvailableLocales()
Locales supported by the platform |
Locale |
getPlatformLocale(Locale l)
|
void |
init()
|
protected String[] |
localeToString(Locale[] locales)
|
Object |
localize(Map localizedData)
Given a map of locale->value or language->value, it returns the appropriate value for the current locale. |
static LocaleManager |
lookup()
|
void |
setCurrentEditLang(String langId)
Set the language in which the system is editing contents. |
void |
setCurrentEditLocale(Locale l)
|
void |
setCurrentLang(String langId)
Set the current language for displaying contents |
void |
setCurrentLocale(Locale l)
|
void |
setDefaultLocale(Locale defaultLocale)
|
void |
setDefaultLocaleId(String defaultLocale)
|
void |
setInstalledLocaleIds(String[] installedLocaleIds)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Inject protected String[] installedLocaleIds
@Inject protected String defaultLocaleId
| Constructor Detail |
|---|
public LocaleManager()
| Method Detail |
|---|
public static LocaleManager lookup()
@PostConstruct public void init()
public String[] getInstalledLocaleIds()
public void setInstalledLocaleIds(String[] installedLocaleIds)
public String getDefaultLocaleId()
public void setDefaultLocaleId(String defaultLocale)
public void setDefaultLocale(Locale defaultLocale)
public Locale getLocaleById(String localeId)
public Locale[] getAllLocales()
public Locale[] getPlatformAvailableLocales()
public Locale getCurrentEditLocale()
public void setCurrentEditLocale(Locale l)
public Locale getCurrentLocale()
public void setCurrentLocale(Locale l)
public Locale getPlatformLocale(Locale l)
public Locale getDefaultLocale()
protected String[] localeToString(Locale[] locales)
public String[] getAllLanguages()
public String[] getPlatformAvailableLangs()
public String[] getLangs()
public String getCurrentEditLang()
public void setCurrentEditLang(String langId)
public String getCurrentLang()
public void setCurrentLang(String langId)
public String getDefaultLang()
public Object localize(Map localizedData)
public static Locale currentLocale()
public static String currentLang()
public ResourceBundle getBundle(String baseName)
public ResourceBundle getBundle(String baseName,
Locale targetLocale)
public ResourceBundle getBundle(String baseName,
Locale targetLocale,
ClassLoader loader)
|
Dashboard Builder Commons 6.1.0.CR1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||