Class Language
java.lang.Object
com.atlassian.confluence.languages.Language
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the name of the Language in its locale formReturns the name for the Locale that is appropriate to display to the usergetDisplayName
(boolean shortCountry) Returns the name for the Locale that is appropriate to display to the userReturns the URL of the flag for this languageReturns JS representation of current language.static String
Returns JS representation of the language.getName()
Returns the name of the Languageint
hashCode()
void
setCountry
(String country) void
setEncoding
(String encoding) void
setFlagUrl
(String flagUrl) Sets the URL of the flag for this languagevoid
setLanguage
(String language) void
void
setVariant
(String variant)
-
Constructor Details
-
Language
-
Language
-
-
Method Details
-
getName
Returns the name of the Language- Returns:
- The output of locale.toString()
- See Also:
-
getDisplayLanguage
Returns the name of the Language in its locale form- Returns:
- The output of locale.getDisplayLanguage(locale)
- See Also:
-
getDisplayName
Returns the name for the Locale that is appropriate to display to the user- Returns:
- The output of locale.getDisplayName(locale)
- See Also:
-
getDisplayName
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:
-
getEncoding
-
setEncoding
-
setLanguage
-
getLanguage
-
setCountry
-
getCountry
-
setVariant
-
setVariant
-
getLocale
-
setLocale
-
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
-
setFlagUrl
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
-
-
getResourceBundlePath
-
getCapitalDisplayLanguage
-
getCapitalDisplayName
-
hashCode
public int hashCode() -
equals
-
getJsLang
Returns JS representation of current language.- Returns:
- String with JS representation of language + locale
-
getJsLang
Returns JS representation of the language. Examples: "en-GB", "en-US", "pt-BR". NOTE: "no_NO" should be "nn".- Parameters:
langStr
- String- Returns:
- String with JS representation of language + locale
-