public class DefaultLocaleManager extends Object implements LocaleManager
DEFAULT_LOCALE
Constructor and Description |
---|
DefaultLocaleManager() |
Modifier and Type | Method and Description |
---|---|
Locale |
getLocale(com.atlassian.user.User user)
Returns the user's locale if they have one set in their preferences, otherwise returns the site default locale.
|
Locale |
getSiteDefaultLocale() |
UserAccessor |
getUserAccessor() |
void |
setCacheManager(com.atlassian.cache.CacheManager cacheManager) |
void |
setLanguage(String language)
Should set the language string as given by Locale (en-gb for example) in a THREAD LOCAL cache.
|
void |
setLanguageManager(LanguageManager languageManager) |
void |
setRequestLanguages(String languageString)
Should set the language string from the request in a THREAD LOCAL cache.
|
void |
setSettingsManager(SettingsManager settingsManager) |
void |
setUserAccessorSupplier(com.atlassian.util.concurrent.Supplier<UserAccessor> userAccessorSupplier) |
public void setUserAccessorSupplier(com.atlassian.util.concurrent.Supplier<UserAccessor> userAccessorSupplier)
public void setCacheManager(com.atlassian.cache.CacheManager cacheManager)
public void setLanguageManager(LanguageManager languageManager)
public Locale getLocale(com.atlassian.user.User user)
getLocale
in interface LocaleManager
public Locale getSiteDefaultLocale()
getSiteDefaultLocale
in interface LocaleManager
LocaleManager.DEFAULT_LOCALE
if none is set.public void setSettingsManager(SettingsManager settingsManager)
public UserAccessor getUserAccessor()
public void setRequestLanguages(String languageString)
LocaleManager
setRequestLanguages
in interface LocaleManager
public void setLanguage(String language)
LocaleManager
setLanguage
in interface LocaleManager
Copyright © 2003–2015 Atlassian. All rights reserved.