public class SetupLocaleManager extends Object implements LocaleManager
Does not allow write operations, which are supposed to be cached for the request or user, since there is no user in
the setup context. Will always delegate to the getSiteDefaultLocale()
even if a user is supplied.
DEFAULT_LOCALE
Constructor and Description |
---|
SetupLocaleManager(com.atlassian.config.ApplicationConfiguration applicationConfiguration) |
Modifier and Type | Method and Description |
---|---|
Locale |
getLocale(com.atlassian.user.User user) |
Locale |
getSiteDefaultLocale() |
void |
setLanguage(String selectedLanguage)
Should set the language string as given by Locale (en-gb for example) in a THREAD LOCAL cache.
|
void |
setRequestLanguages(String languageString)
Should set the language string from the request in a THREAD LOCAL cache.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLocaleInfo, invalidateLocaleInfoCache
public SetupLocaleManager(com.atlassian.config.ApplicationConfiguration applicationConfiguration)
public Locale getSiteDefaultLocale()
getSiteDefaultLocale
in interface LocaleManager
LocaleManager.DEFAULT_LOCALE
if none is set.public Locale getLocale(com.atlassian.user.User user)
getLocale
in interface LocaleManager
public void setRequestLanguages(String languageString)
LocaleManager
setRequestLanguages
in interface LocaleManager
languageString
- comma- or semicolon-separated languagespublic void setLanguage(String selectedLanguage)
LocaleManager
setLanguage
in interface LocaleManager
selectedLanguage
- target languageCopyright © 2003–2017 Atlassian. All rights reserved.