Class Language
- java.lang.Object
- 
- com.atlassian.confluence.languages.Language
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class Language extends Object implements Serializable - See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description Language(LanguageModuleDescriptor moduleDescriptor)Language(Locale locale)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetCapitalDisplayLanguage()StringgetCapitalDisplayName()StringgetCountry()StringgetDisplayLanguage()Returns the name of the Language in its locale formStringgetDisplayName()Returns the name for the Locale that is appropriate to display to the userStringgetDisplayName(boolean shortCountry)Returns the name for the Locale that is appropriate to display to the userStringgetEncoding()StringgetFlagUrl()Returns the URL of the flag for this languageStringgetJsLang()Returns JS representation of current language.static StringgetJsLang(String langStr)Returns JS representation of the language.StringgetLanguage()LocalegetLocale()StringgetName()Returns the name of the LanguageStringgetResourceBundlePath()inthashCode()voidsetCountry(String country)voidsetEncoding(String encoding)voidsetFlagUrl(String flagUrl)Sets the URL of the flag for this languagevoidsetLanguage(String language)voidsetLocale(Locale locale)StringsetVariant()voidsetVariant(String variant)
 
- 
- 
- 
Constructor Detail- 
Languagepublic Language(Locale locale) 
 - 
Languagepublic Language(LanguageModuleDescriptor moduleDescriptor) 
 
- 
 - 
Method Detail- 
getNamepublic String getName() Returns the name of the Language- Returns:
- The output of locale.toString()
- See Also:
- Locale.toString()
 
 - 
getDisplayLanguagepublic String getDisplayLanguage() Returns the name of the Language in its locale form- Returns:
- The output of locale.getDisplayLanguage(locale)
- See Also:
- Locale.getDisplayLanguage()
 
 - 
getDisplayNamepublic String getDisplayName() Returns the name for the Locale that is appropriate to display to the user- Returns:
- The output of locale.getDisplayName(locale)
- See Also:
- Locale.getDisplayName()
 
 - 
getDisplayNamepublic String getDisplayName(boolean shortCountry) Returns the name for the Locale that is appropriate to display to the user- Parameters:
- shortCountry- if true, returns "UK" instead of "United Kingdom" and "US" instead of "United States"
- Returns:
- The output of locale.getDisplayName(locale)
- See Also:
- Locale.getDisplayName()
 
 - 
getEncodingpublic String getEncoding() 
 - 
setEncodingpublic void setEncoding(String encoding) 
 - 
setLanguagepublic void setLanguage(String language) 
 - 
getLanguagepublic String getLanguage() 
 - 
setCountrypublic void setCountry(String country) 
 - 
getCountrypublic String getCountry() 
 - 
setVariantpublic void setVariant(String variant) 
 - 
setVariantpublic String setVariant() 
 - 
getLocalepublic Locale getLocale() 
 - 
setLocalepublic void setLocale(Locale locale) 
 - 
getFlagUrlpublic String getFlagUrl() Returns the URL of the flag for this languageNote: This URL does not contain the context path or base URL of the Confluence installation - Returns:
- String representing the URL
 
 - 
setFlagUrlpublic void setFlagUrl(String flagUrl) Sets the URL of the flag for this languageNote: This URL should not contain the context path or base URL of the Confluence installation - Parameters:
- flagUrl-
 
 - 
getResourceBundlePathpublic String getResourceBundlePath() 
 - 
getCapitalDisplayLanguagepublic String getCapitalDisplayLanguage() 
 - 
getCapitalDisplayNamepublic String getCapitalDisplayName() 
 - 
getJsLangpublic String getJsLang() Returns JS representation of current language.- Returns:
- String with JS representation of language + locale
 
 
- 
 
-