summaryrefslogtreecommitdiff
path: root/packages/lang/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'packages/lang/README.md')
-rw-r--r--packages/lang/README.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/lang/README.md b/packages/lang/README.md
new file mode 100644
index 0000000..dc185a1
--- /dev/null
+++ b/packages/lang/README.md
@@ -0,0 +1,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.
+