Package org.basex.util.ft
Class Language
java.lang.Object
org.basex.util.ft.Language
- All Implemented Interfaces:
Comparable<Language>
This class contains language tokens which are valid for the xml:lang
attribute.
As specified by W3C, the values of the attribute are language identifiers as
defined by IETF BCP 47, Tags for the Identification of Languages.
- Author:
- BaseX Team 2005-21, BSD License, Dimitar Popov, Jens Erat
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the language code (ISO 639).intstatic Languagedef()Returns the user language as default language, or English if the language cannot be assigned.booleanstatic LanguageReturns an instance for the specified language code ornull.static Languageget(MainOptions opts) Returns an instance for the current language option, or English as default language.inthashCode()toString()
-
Method Details
-
get
Returns an instance for the specified language code ornull.- Parameters:
lang- name or code of language- Returns:
- language code
-
get
Returns an instance for the current language option, or English as default language.- Parameters:
opts- database options- Returns:
- language code
-
def
Returns the user language as default language, or English if the language cannot be assigned.- Returns:
- default language
-
code
Returns the language code (ISO 639).- Returns:
- code
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<Language>
-
toString
-