summaryrefslogtreecommitdiff
path: root/packages/langlib/src/types.ts
blob: b9b163efd5342d4443add946b800238ec10c55bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// *   Category of a language:
// *
// *   *   `'living'`
// *       — currently spoken language
// *       (example: `nhi` for `Zacatlán-Ahuacatlán-Tepetzintla Nahuatl`)
// *   *   `'historical'`
// *       — extinct language distinct from modern languages that descended from it
// *       (example: `ofs` for `Old Frisian`)
// *   *   `'extinct'`
// *       — language that went extinct recently
// *       (example: `rbp` for `Barababaraba`)
// *   *   `'ancient'`
// *       — language that went extinct long ago
// *       (example: `got` for `Gothic`)
// *   *   `'constructed'`
// *       — artificial languages, excluding programming languages
// *       (example: `epo` for `Esperanto`)
// *   *   `'special'`
// *       — non-language codes
// *       (example: `und` for `Undetermined`)
// *
// *   Scope of a language:
// *
// *   *   `'individual'`
// *       — normal, single language
// *       (example: `eng` for `English`)
// *   *   `'macrolanguage'`
// *       — one-to-many grouping of languages, because older ISO 639s included them
// *       (example: `ara` for `Arabic`)
// *   *   `'special'`
// *       — non-language codes
// *       (example: `und` for `Undetermined`)
// *

type ISO_6393_3_TYPE = string;
export type ISO_6393_3 = {
  // Script name.
  name: string;
  //  Four character ISO 15924 code.
  type: ISO_6393_3_TYPE;
  // // *   Three character ISO 15924 code.
  scope: "individual" | "macrolanguage" | "special";
  // *   Property value alias.
  iso6393: string;
  // *   ISO 639-2 (bibliographic) code (example: `'eng'`).
  iso6392B?: string;
  // *   ISO 639-2 (terminologic) code (example: `'eng'`).
  iso6392T?: string;
  iso6391?: string;
};

export * from "./dbtypes";