public interface ILocaleInfo
ILocaleInfo is an interface that describes what types of locale tools are availble
Modifier and Type | Method and Description |
---|---|
void |
evaluateLocale()
Locale negotiation algorithm:
Call to
getLocale() will return the result
1. |
com.softwareag.g11n.util.iContext |
getiContext() |
Locale |
getLocale() |
void |
setLocale(Locale locale)
Sets the current user locale
|
void |
setLocale(String locale)
Sets current user locale
|
Locale getLocale()
void setLocale(String locale)
locale
- string value for the new locale to be setvoid setLocale(Locale locale)
locale
- new localegetLocale()
com.softwareag.g11n.util.iContext getiContext()
void evaluateLocale()
getLocale()
will return the result
1. Test request locale attribute. If defined use its value, if not continue.
2. Test request locale parameter. If defined use its value, if not continue.
3. Test locale rules. If a rule is triggered use the target locale, if not continue.
4. Test non-anonymous user locale preference that comes from User Profile Attributes PAP. If defied use it, if not continue.
5. Test user browser language preferences. Defined by the browser and delivered using Accept-Language request header.
First preferred language which is deployed with a language pack is used.
If no deployed language packs handle preferred languages continue.
6. Use system default locale. Currently defined by the operating system running the portal server.IGlobalProvider.getDefaultLocale()