com.atlassian.sal.core.message
Class SystemDefaultLocaleResolver
java.lang.Object
com.atlassian.sal.core.message.SystemDefaultLocaleResolver
- All Implemented Interfaces:
- LocaleResolver
public class SystemDefaultLocaleResolver
- extends Object
- implements LocaleResolver
Simple resolver that only supports the system default locale.
- Since:
- 2.2.0
|
Method Summary |
Locale |
getLocale(javax.servlet.http.HttpServletRequest request)
Given a request, 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SystemDefaultLocaleResolver
public SystemDefaultLocaleResolver()
getLocale
public Locale getLocale(javax.servlet.http.HttpServletRequest request)
- Description copied from interface:
LocaleResolver
- Given a request, resolve the
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.
- Specified by:
getLocale in interface LocaleResolver
- Parameters:
request - Request to check
- Returns:
- Locale to be used in i18n and l10n.
Locale.getDefault() if none found.
getSupportedLocales
public Set<Locale> getSupportedLocales()
- Description copied from interface:
LocaleResolver
- Returns a set of all the supported locales by the host application. This is all the language packs that
are installed.
- Specified by:
getSupportedLocales in interface LocaleResolver
- Returns:
- an unmodifiable set of all the supported locales by the host application. Must contain at least one locale.
Copyright © 2011 Atlassian. All Rights Reserved.