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.StringgetLanguage()Gets the language (primary language plus extended language subtags).StringgetPrimaryLanguage()Gets the primary language.StringgetPrivateUse()Gets the private use.StringgetRegion()Gets the region.StringgetScript()Gets the script.String[]getVariants()Gets the variants.StringtoString()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.
nullif 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.
nullif 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.
nullif not defined.
-
getVariants
String[] getVariants()
Gets the variants.See RFC 5646 section 2.2.5.
- Returns:
- The variants.
nullif not defined.
-
getExtensions
String[] getExtensions()
Gets the extensions.See RFC 5646 section 2.2.6.
- Returns:
- The extensions.
nullif not defined.
-
getPrivateUse
String getPrivateUse()
Gets the private use.See RFC 5646 section 2.2.7.
- Returns:
- The private use.
nullif not defined.
-
-