public class DefaultLanguageManager extends Object implements LanguageManager
Constructor and Description |
---|
DefaultLanguageManager() |
Modifier and Type | Method and Description |
---|---|
List<LanguageModuleDescriptor> |
getAvailableLanguageDescriptors()
Retrieves a List of all enabled LanguageModuleDescriptors
|
static Language |
getDefaultEnglishLanguage()
Returns a Language object with the Locale set to en_GB
Also sets the location of the flag URL
|
String |
getDisplayName(Language language) |
Language |
getGlobalDefaultLanguage()
Returns the language enabled as the global default.
|
Language |
getLanguage(String languageKey)
Retrieves the Language for the given key
Null is returned when a plugin with languageKey could not be found, or it was not a Language
|
Map<String,Language> |
getLanguageMap() |
List<Language> |
getLanguages()
Returns a list of Language objects, representing the currently loaded languages
|
void |
handlePluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event) |
void |
handlePluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event) |
boolean |
isDuplicateLanguage(Language language)
Determine whether there are at least two language packs for the given language installed.
|
void |
setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor) |
void |
setPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager) |
void |
setSettingsManager(SettingsManager settingsManager) |
public static Language getDefaultEnglishLanguage()
public List<LanguageModuleDescriptor> getAvailableLanguageDescriptors()
public Language getLanguage(String languageKey)
LanguageManager
getLanguage
in interface LanguageManager
languageKey
- The key to retrieve the language forpublic List<Language> getLanguages()
LanguageManager
The en_GB locale is also added to the list
The sorting for this list is undefined.
getLanguages
in interface LanguageManager
public final Language getGlobalDefaultLanguage()
LanguageManager
getGlobalDefaultLanguage
in interface LanguageManager
public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
public void handlePluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
public void handlePluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
public boolean isDuplicateLanguage(Language language)
language
- public void setPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
public void setSettingsManager(SettingsManager settingsManager)
Copyright © 2003–2019 Atlassian. All rights reserved.