Class: Language

models~ Language

A class representing a language, formatted according to the DLx Data Format for a language


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
Name Type Argument Description
abbreviation String <optional>

An abbreviation for this Language. Must be a valid DLx Abbreviation string.

glottolog String <optional>

The Glottolog Code for this language.

iso String <optional>

The ISO 639-3 code for this language.

name Map | Object | String <optional>

The name of this language. May be a string if English, an Object formatted as a MultiLangString, or a Map of language tags => transcriptions.

tags Map | Object <optional>

A Map or Object of tags for this Language, formatted as a DLx Tags object.

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