summaryrefslogtreecommitdiff
path: root/packages/lang/README.md
blob: dc185a1f02ae7092d844313a0ff18299e815992e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Langlib

Utils to deal with languages and stuff.

## Langcodes

- ISO-639-1 are **two** characters. e.g. "en", "fr", "zh".
- ISO-639-2 are **three** characters. e.g. "eng", "fra", "jpn", "cnm".
- ISO-639-3 are also **three** characters. It's more exhasustive than ISO-639-2, supposedly covers every single language.
### BCP-47
BCP-47 (_Best Current Practice_) is a wider tag that includes in one string language, script and region.
e.g.
- `en-US`
- `en-Latn-US`
- `zh-Hans-CN`
Format is `language-script-region-variant-extension`

Region codes are ISO 3166-1
Script tags are ISO 15924
Variant tags aren't standardized.

It may include all or some of these.