Package com.nimbusds.langtag
Interface ReadOnlyLangTag
-
- All Known Implementing Classes:
LangTag
public interface ReadOnlyLangTag
Read-only view of aLanguage tag
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]
getExtendedLanguageSubtags()
Gets the extended language subtags.String[]
getExtensions()
Gets the extensions.String
getLanguage()
Gets the language (primary language plus extended language subtags).String
getPrimaryLanguage()
Gets the primary language.String
getPrivateUse()
Gets the private use.String
getRegion()
Gets the region.String
getScript()
Gets the script.String[]
getVariants()
Gets the variants.String
toString()
Returns the canonical string representation of this language tag.
-
-
-
Method Detail
-
getLanguage
String getLanguage()
Gets the language (primary language plus extended language subtags).See RFC 5646 section 2.2.1.
Examples:
en de zh-cmn cmn
- Returns:
- The language, consisting of the primary and/or extended language subtags.
-
getPrimaryLanguage
String getPrimaryLanguage()
Gets the primary language.See RFC 5646 section 2.2.1.
- Returns:
- The primary language, as a two or three-letter ISO 639 code, in canonical lower case format.
-
getExtendedLanguageSubtags
String[] getExtendedLanguageSubtags()
Gets the extended language subtags.See RFC 5646 section 2.2.2.
- Returns:
- The extended language subtags, as three-letter ISO 639-3
codes.
null
if none.
-
getScript
String getScript()
Gets the script.See RFC 5646 section 2.2.3.
- Returns:
- The script, as an ISO 15924 code, in canonical title case
format.
null
if not defined.
-
getRegion
String getRegion()
Gets the region.See RFC 5646 section 2.2.4.
- Returns:
- The region, as a two-letter ISO 3166-1 code or a three-digit
UN M.49 code.
null
if not defined.
-
getVariants
String[] getVariants()
Gets the variants.See RFC 5646 section 2.2.5.
- Returns:
- The variants.
null
if not defined.
-
getExtensions
String[] getExtensions()
Gets the extensions.See RFC 5646 section 2.2.6.
- Returns:
- The extensions.
null
if not defined.
-
getPrivateUse
String getPrivateUse()
Gets the private use.See RFC 5646 section 2.2.7.
- Returns:
- The private use.
null
if not defined.
-
-