Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/iso639_1/src/mod.ts>authoritativeLabels

Type-safe ISO 639-1 language code (a.k.a. two-letter codes) for TypeScript
Latest
variable authoritativeLabels
import { authoritativeLabels } from "https://deno.land/x/iso639_1@1.2.20090901/src/mod.ts";

The authoritative labels of all valid language codes. In the first dimension, the object is indexed by the language code. In the second dimension, the object is indexed by the authoritative label language. In the third dimension, the array consists of the authoritative labels of the language code in the authoritative label language.

For example, authoritativeLabels.en.fr is ["anglais"], which means English in French, and authoritativeLabels.fr.de is ["Französisch"], which means French in German.

Note that although the authoritative labels for each language code are usually one-element arrays, they can be multiple-element arrays in some cases. For example, authoritativeLabels.es.en consists of ["Spanish", "Castilian"], as Spanish and Castilian are basically the same language which are mutually intelligible.

type

Record<languageCodes[number], Record<authoritativeLabelLanguages[number], [string, ...string[]]>>