new Language( [data])
Create a new Language
Parameters:
Name | Type | Argument | Default | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object |
<optional> |
{} | The data to use for this Language object. Data should be formatted according to the DLx Data Format's guidelines for Language data. Properties
|
Properties:
Name | Type | Description |
---|---|---|
abbreviation |
String | The abbreviation for this language |
glottolog |
String | The Glottocode for this language |
iso |
String | The ISO 639-3 code for this language |
name |
models.MultiLangString | The name of this language |
tags |
models.Tags | The tags for this language |
type |
String | "Language" |
Extends
Methods
-
<inner> validateAbbreviation(input)
-
Validates a language abbreviation. Throws a type error if the input is not a valid abbreviation.
Parameters:
Name Type Description input
Any The input to validate
-
<inner> validateGlottoCode(input)
-
Validates a Glottolog language code. Throws a type error if the input is not a valid Glottolog code.
Parameters:
Name Type Description input
Any The input to validate
-
<inner> validateISOCode(input)
-
Validates an ISO 639-3 language code. Throws a type error if the input is not a valid ISO 639-3 code.
Parameters:
Name Type Description input
Any The input to validate