public class SystemDefaultLocaleResolver extends Object implements LocaleResolver
Constructor and Description |
---|
SystemDefaultLocaleResolver() |
Modifier and Type | Method and Description |
---|---|
Locale |
getLocale()
Resolve the Locale that should be used in internationalization and localization.
|
Locale |
getLocale(javax.servlet.http.HttpServletRequest request)
Given a request, resolve the
Locale that should be used in internationalization and localization. |
Locale |
getLocale(UserKey userKey)
Resolve the Locale that should be used in internationalization and localization.
|
Set<Locale> |
getSupportedLocales()
Returns a set of all the supported locales by the host application.
|
public Locale getLocale(javax.servlet.http.HttpServletRequest request)
LocaleResolver
Locale
that should be used in internationalization and localization.
The locale should be determined by first checking the remote users preferences, then defaulting to the
application default locale if no preferred locale is set. May consult the given request for the preferred
browser locales (if supported by the product).getLocale
in interface LocaleResolver
request
- Request to checkLocale.getDefault()
if none found.public Locale getLocale()
LocaleResolver
getLocale
in interface LocaleResolver
Locale.getDefault()
if none found.public Locale getLocale(UserKey userKey)
LocaleResolver
getLocale
in interface LocaleResolver
userKey
- the user. Can be null.Locale.getDefault()
if none found.public Set<Locale> getSupportedLocales()
LocaleResolver
getSupportedLocales
in interface LocaleResolver
Copyright © 2015 Atlassian. All rights reserved.