@PublicApi
public interface LocaleManager
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_LOCALE
The default locale id.
|
| Modifier and Type | Method and Description |
|---|---|
Set<Locale> |
getInstalledLocales()
Returns a set of locales supported by this JIRA instance.
|
Map<String,String> |
getInstalledLocalesWithDefault(Locale defaultLocale,
I18nHelper i18nHelper)
Returns a mapping of localeString to its displayname.
|
Locale |
getLocale(String locale)
Given a string, return the corresponding Locale.
|
Locale |
getLocaleFor(ApplicationUser user)
Returns the locale for the given user.
|
void |
validateUserLocale(ApplicationUser loggedInUser,
String locale,
ErrorCollection errorCollection)
Given a user entered locale string this method ensures that it is in fact a locale that
exists in this instance
|
static final String DEFAULT_LOCALE
Set<Locale> getInstalledLocales()
Map<String,String> getInstalledLocalesWithDefault(Locale defaultLocale, I18nHelper i18nHelper)
defaultLocale - The locale to use as the defaulti18nHelper - Required to internationalize the 'Default'Locale getLocale(String locale)
locale - Locale in string formLocale objectLocale getLocaleFor(ApplicationUser user)
user - The uservoid validateUserLocale(ApplicationUser loggedInUser, String locale, ErrorCollection errorCollection)
loggedInUser - The user performing the operationlocale - the locale String to validate (e.g. en_UK)errorCollection - Error collection to record errors inCopyright © 2002-2016 Atlassian. All Rights Reserved.