diff --git a/.circleci/config.yml b/.circleci/config.yml
index 3bf91d55..b2e71504 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -5,15 +5,15 @@ jobs:
LC_ALL: C.UTF-8
LANG: C.UTF-8
docker:
- - image: debian:stretch
+ - image: cimg/base:2023.09
steps:
- checkout
- run:
name: Install Dependencies
command: |
- apt-get update
- apt-get -y install locales make
- apt-get -y install util-linux bsdmainutils gawk curl rlwrap emacs
+ sudo apt-get update
+ sudo apt-get -y install locales make
+ sudo apt-get -y install util-linux bsdmainutils gawk curl rlwrap emacs
- run:
name: Sanity Check
command: |
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3d6c17a5..2460517b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -5,6 +5,9 @@ on:
branches:
- develop
- stable
+ pull_request:
+ branches:
+ - develop
jobs:
build:
@@ -12,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index cc606c79..fef78936 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -12,7 +12,7 @@
### Waiving Copyrights
-This is a public domain software, which means the author(s) do not retain any copyright interest in this repository. You ("the contributor") will be asked to **[sign the Contributor License Agreement](https://www.clahub.com/agreements/soimort/translate-shell)** before your contribution can be considered.
+This is a public domain software, which means the author(s) do not retain any copyright interest in this repository. By submitting a pull request, you (as a contributor) must agree that your code is also put into the public domain, as this software is.
### Following the Coding Style
diff --git a/Makefile b/Makefile
index ef165211..495db3d7 100644
--- a/Makefile
+++ b/Makefile
@@ -27,17 +27,19 @@ test: build
check: test
$(BUILDDIR)/$(COMMAND) -V
- [ "`$(BUILDDIR)/$(COMMAND) -no-init -D -b 忍者`" = 'Ninja' ] &&\
- [ "`$(BUILDDIR)/$(COMMAND) -no-init -D -b -e bing 忍者`" = 'Ninja' ] &&\
- [ "`$(BUILDDIR)/$(COMMAND) -no-init -D -b -e yandex Ninja`" = 'Ninja' ]
+ [ "`$(BUILDDIR)/$(COMMAND) -no-init -D -b 忍者`" = 'ninja' ] &&\
+ [ "`$(BUILDDIR)/$(COMMAND) -no-init -D -b -e bing 忍者`" = 'ninja' ] #&&\
+ #[ "`$(BUILDDIR)/$(COMMAND) -no-init -D -b -e yandex Ninja`" = 'Ninja' ]
install: build
@mkdir -p $(DESTDIR)$(PREFIX)/bin &&\
install $(BUILDDIR)/$(COMMAND) $(DESTDIR)$(PREFIX)/bin/$(COMMAND) &&\
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 &&\
install $(MANDIR)/$(COMMAND).1 $(DESTDIR)$(PREFIX)/share/man/man1/$(COMMAND).1 &&\
+ mkdir -p $(DESTDIR)$(PREFIX)/etc/bash_completion.d &&\
+ install translate-shell.bash $(DESTDIR)$(PREFIX)/etc/bash_completion.d &&\
echo "[OK] $(NAME) installed."
uninstall:
- @rm $(DESTDIR)$(PREFIX)/bin/$(COMMAND) $(DESTDIR)$(PREFIX)/share/man/man1/$(COMMAND).1 &&\
+ @rm $(DESTDIR)$(PREFIX)/bin/$(COMMAND) $(DESTDIR)$(PREFIX)/share/man/man1/$(COMMAND).1 $(DESTDIR)$(PREFIX)/etc/bash_completion.d/translate-shell.bash &&\
echo "[OK] $(NAME) uninstalled."
diff --git a/README.md b/README.md
index ca5ce6a6..9da42c90 100644
--- a/README.md
+++ b/README.md
@@ -66,6 +66,7 @@ In order to be happy, the best way is to be loved by people.
* gawk comes with all GNU/Linux distributions.
* On FreeBSD, gawk is available in the ports.
* On macOS, gawk is available in MacPorts and Homebrew.
+ * Please note that gawk 5.2.0 has a [known bug](https://github.com/soimort/translate-shell/issues/463) -- update to gawk 5.2.1 instead.
* **[GNU Bash](http://www.gnu.org/software/bash/)** or **[Zsh](http://www.zsh.org/)**
* You may use Translate Shell from any Unix shell of your choice (bash, zsh, ksh, tcsh, fish, etc.); however, the wrapper script requires either **bash** or **zsh** installed.
@@ -130,7 +131,7 @@ See **[wiki: Distros](https://github.com/soimort/translate-shell/wiki/Distros)**
Add the following line to your `.zshrc`:
- antigen bundle soimort/translate-shell
+ antigen bundle soimort/translate-shell@develop
### Option #3. From Git
@@ -317,7 +318,7 @@ A browser session will open for viewing the translation (via Google Translate's
### Language Details
-Use the `-list` (`-L`) option to view details of one or more languages:
+Use the `-linguist` (`-L`) option to view details of one or more languages:
$ trans -L fr
$ trans -L de+en
@@ -351,13 +352,21 @@ Information options:
-M, -man
Show man page and exit.
-T, -reference
- Print reference table of languages and exit.
+ Print reference table of languages (in endonyms) and codes, and exit.
-R, -reference-english
- Print reference table of languages (in English names) and exit.
- -L CODES, -list CODES
- Print details of languages and exit.
+ Print reference table of languages (in English names) and codes, and exit.
-S, -list-engines
List available translation engines and exit.
+ -list-languages
+ List all languages (in endonyms) and exit.
+ -list-languages-english
+ List all languages (in English names) and exit.
+ -list-codes
+ List all codes and exit.
+ -list-all
+ List all languages (endonyms and English names) and codes, and exit.
+ -L CODES, -linguist CODES
+ Print details of languages and exit.
-U, -upgrade
Check for upgrade of this program.
@@ -468,8 +477,8 @@ I/O options:
Specify the output file.
Language preference options:
- -l CODE, -hl CODE, -lang CODE
- Specify your home language.
+ -hl CODE, -host CODE
+ Specify the host (interface) language.
-s CODES, -sl CODES, -source CODES, -from CODES
Specify the source language(s), joined by '+'.
-t CODES, -tl CODES, -target CODES, -to CODES
@@ -494,48 +503,63 @@ For more details on languages and corresponding codes, see **[wiki: Languages](h
| Language | Code | Language | Code | Language | Code |
| :------: | :--: | :------: | :--: | :------: | :--: |
-| **[Afrikaans](http://en.wikipedia.org/wiki/Afrikaans_language)**
**Afrikaans** | **`af`** | **[Hill Mari](http://en.wikipedia.org/wiki/Hill_Mari)**
**Кырык мары** | **`mrj`** | **[Portuguese](http://en.wikipedia.org/wiki/Portuguese_language)**
**Português** | **`pt`** |
-| **[Albanian](http://en.wikipedia.org/wiki/Albanian_language)**
**Shqip** | **`sq`** | **[Hindi](http://en.wikipedia.org/wiki/Hindi_language)**
**हिन्दी** | **`hi`** | **[Punjabi](http://en.wikipedia.org/wiki/Punjabi_language)**
**ਪੰਜਾਬੀ** | **`pa`** |
-| **[Amharic](http://en.wikipedia.org/wiki/Amharic_language)**
**አማርኛ** | **`am`** | **[Hmong](http://en.wikipedia.org/wiki/Hmong_language)**
**Hmoob** | **`hmn`** | **[Querétaro Otomi](http://en.wikipedia.org/wiki/Querétaro_Otomi)**
**Hñąñho** | **`otq`** |
-| **[Arabic](http://en.wikipedia.org/wiki/Arabic_language)**
**العربية** | **`ar`** | **[Hmong Daw](http://en.wikipedia.org/wiki/Hmong_Daw)**
**Hmoob Daw** | **`mww`** | **[Romanian](http://en.wikipedia.org/wiki/Romanian_language)**
**Română** | **`ro`** |
-| **[Armenian](http://en.wikipedia.org/wiki/Armenian_language)**
**Հայերեն** | **`hy`** | **[Hungarian](http://en.wikipedia.org/wiki/Hungarian_language)**
**Magyar** | **`hu`** | **[Russian](http://en.wikipedia.org/wiki/Russian_language)**
**Русский** | **`ru`** |
-| **[Azerbaijani](http://en.wikipedia.org/wiki/Azerbaijani_language)**
**Azərbaycanca** | **`az`** | **[Icelandic](http://en.wikipedia.org/wiki/Icelandic_language)**
**Íslenska** | **`is`** | **[Samoan](http://en.wikipedia.org/wiki/Samoan_language)**
**Gagana Sāmoa** | **`sm`** |
-| **[Bashkir](http://en.wikipedia.org/wiki/Bashkir_language)**
**башҡорт теле** | **`ba`** | **[Igbo](http://en.wikipedia.org/wiki/Igbo_language)**
**Igbo** | **`ig`** | **[Scots Gaelic](http://en.wikipedia.org/wiki/Scots_Gaelic)**
**Gàidhlig** | **`gd`** |
-| **[Basque](http://en.wikipedia.org/wiki/Basque_language)**
**Euskara** | **`eu`** | **[Indonesian](http://en.wikipedia.org/wiki/Indonesian_language)**
**Bahasa Indonesia** | **`id`** | **[Serbian (Cyrillic)](http://en.wikipedia.org/wiki/Serbian_(Cyrillic))**
**српски** | **`sr-Cyrl`** |
-| **[Belarusian](http://en.wikipedia.org/wiki/Belarusian_language)**
**беларуская** | **`be`** | **[Irish](http://en.wikipedia.org/wiki/Irish_language)**
**Gaeilge** | **`ga`** | **[Serbian (Latin)](http://en.wikipedia.org/wiki/Serbian_(Latin))**
**srpski** | **`sr-Latn`** |
-| **[Bengali](http://en.wikipedia.org/wiki/Bengali_language)**
**বাংলা** | **`bn`** | **[Italian](http://en.wikipedia.org/wiki/Italian_language)**
**Italiano** | **`it`** | **[Sesotho](http://en.wikipedia.org/wiki/Sesotho_language)**
**Sesotho** | **`st`** |
-| **[Bosnian](http://en.wikipedia.org/wiki/Bosnian_language)**
**Bosanski** | **`bs`** | **[Japanese](http://en.wikipedia.org/wiki/Japanese_language)**
**日本語** | **`ja`** | **[Shona](http://en.wikipedia.org/wiki/Shona_language)**
**chiShona** | **`sn`** |
-| **[Bulgarian](http://en.wikipedia.org/wiki/Bulgarian_language)**
**български** | **`bg`** | **[Javanese](http://en.wikipedia.org/wiki/Javanese_language)**
**Basa Jawa** | **`jv`** | **[Sindhi](http://en.wikipedia.org/wiki/Sindhi_language)**
**سنڌي** | **`sd`** |
-| **[Cantonese](http://en.wikipedia.org/wiki/Cantonese_language)**
**粵語** | **`yue`** | **[Kannada](http://en.wikipedia.org/wiki/Kannada_language)**
**ಕನ್ನಡ** | **`kn`** | **[Sinhala](http://en.wikipedia.org/wiki/Sinhala_language)**
**සිංහල** | **`si`** |
-| **[Catalan](http://en.wikipedia.org/wiki/Catalan_language)**
**Català** | **`ca`** | **[Kazakh](http://en.wikipedia.org/wiki/Kazakh_language)**
**Қазақ тілі** | **`kk`** | **[Slovak](http://en.wikipedia.org/wiki/Slovak_language)**
**Slovenčina** | **`sk`** |
-| **[Cebuano](http://en.wikipedia.org/wiki/Cebuano_language)**
**Cebuano** | **`ceb`** | **[Khmer](http://en.wikipedia.org/wiki/Khmer_language)**
**ភាសាខ្មែរ** | **`km`** | **[Slovenian](http://en.wikipedia.org/wiki/Slovenian_language)**
**Slovenščina** | **`sl`** |
-| **[Chichewa](http://en.wikipedia.org/wiki/Chichewa_language)**
**Nyanja** | **`ny`** | **[Kinyarwanda](http://en.wikipedia.org/wiki/Kinyarwanda_language)**
**Ikinyarwanda** | **`rw`** | **[Somali](http://en.wikipedia.org/wiki/Somali_language)**
**Soomaali** | **`so`** |
-| **[Chinese Simplified](http://en.wikipedia.org/wiki/Chinese_Simplified)**
**简体中文** | **`zh-CN`** | **[Klingon](http://en.wikipedia.org/wiki/Klingon_language)**
**tlhIngan Hol** | **`tlh`** | **[Spanish](http://en.wikipedia.org/wiki/Spanish_language)**
**Español** | **`es`** |
-| **[Chinese Traditional](http://en.wikipedia.org/wiki/Chinese_Traditional)**
**正體中文** | **`zh-TW`** | **[Klingon (pIqaD)](http://en.wikipedia.org/wiki/Klingon_(pIqaD))**
** ** | **`tlh-Qaak`** | **[Sundanese](http://en.wikipedia.org/wiki/Sundanese_language)**
**Basa Sunda** | **`su`** |
-| **[Corsican](http://en.wikipedia.org/wiki/Corsican_language)**
**Corsu** | **`co`** | **[Korean](http://en.wikipedia.org/wiki/Korean_language)**
**한국어** | **`ko`** | **[Swahili](http://en.wikipedia.org/wiki/Swahili_language)**
**Kiswahili** | **`sw`** |
-| **[Croatian](http://en.wikipedia.org/wiki/Croatian_language)**
**Hrvatski** | **`hr`** | **[Kurdish](http://en.wikipedia.org/wiki/Kurdish_language)**
**Kurdî** | **`ku`** | **[Swedish](http://en.wikipedia.org/wiki/Swedish_language)**
**Svenska** | **`sv`** |
-| **[Czech](http://en.wikipedia.org/wiki/Czech_language)**
**Čeština** | **`cs`** | **[Kyrgyz](http://en.wikipedia.org/wiki/Kyrgyz_language)**
**Кыргызча** | **`ky`** | **[Tahitian](http://en.wikipedia.org/wiki/Tahitian_language)**
**Reo Tahiti** | **`ty`** |
-| **[Danish](http://en.wikipedia.org/wiki/Danish_language)**
**Dansk** | **`da`** | **[Lao](http://en.wikipedia.org/wiki/Lao_language)**
**ລາວ** | **`lo`** | **[Tajik](http://en.wikipedia.org/wiki/Tajik_language)**
**Тоҷикӣ** | **`tg`** |
-| **[Dutch](http://en.wikipedia.org/wiki/Dutch_language)**
**Nederlands** | **`nl`** | **[Latin](http://en.wikipedia.org/wiki/Latin_language)**
**Latina** | **`la`** | **[Tamil](http://en.wikipedia.org/wiki/Tamil_language)**
**தமிழ்** | **`ta`** |
-| **[Eastern Mari](http://en.wikipedia.org/wiki/Eastern_Mari)**
**Олык марий** | **`mhr`** | **[Latvian](http://en.wikipedia.org/wiki/Latvian_language)**
**Latviešu** | **`lv`** | **[Tatar](http://en.wikipedia.org/wiki/Tatar_language)**
**татарча** | **`tt`** |
-| **[Emoji](http://en.wikipedia.org/wiki/Emoji_language)**
**Emoji** | **`emj`** | **[Lithuanian](http://en.wikipedia.org/wiki/Lithuanian_language)**
**Lietuvių** | **`lt`** | **[Telugu](http://en.wikipedia.org/wiki/Telugu_language)**
**తెలుగు** | **`te`** |
-| **[English](http://en.wikipedia.org/wiki/English_language)**
**English** | **`en`** | **[Luxembourgish](http://en.wikipedia.org/wiki/Luxembourgish_language)**
**Lëtzebuergesch** | **`lb`** | **[Thai](http://en.wikipedia.org/wiki/Thai_language)**
**ไทย** | **`th`** |
-| **[Esperanto](http://en.wikipedia.org/wiki/Esperanto_language)**
**Esperanto** | **`eo`** | **[Macedonian](http://en.wikipedia.org/wiki/Macedonian_language)**
**Македонски** | **`mk`** | **[Tongan](http://en.wikipedia.org/wiki/Tongan_language)**
**Lea faka-Tonga** | **`to`** |
-| **[Estonian](http://en.wikipedia.org/wiki/Estonian_language)**
**Eesti** | **`et`** | **[Malagasy](http://en.wikipedia.org/wiki/Malagasy_language)**
**Malagasy** | **`mg`** | **[Turkish](http://en.wikipedia.org/wiki/Turkish_language)**
**Türkçe** | **`tr`** |
-| **[Fijian](http://en.wikipedia.org/wiki/Fijian_language)**
**Vosa Vakaviti** | **`fj`** | **[Malay](http://en.wikipedia.org/wiki/Malay_language)**
**Bahasa Melayu** | **`ms`** | **[Turkmen](http://en.wikipedia.org/wiki/Turkmen_language)**
**Türkmen** | **`tk`** |
-| **[Filipino](http://en.wikipedia.org/wiki/Filipino_language)**
**Tagalog** | **`tl`** | **[Malayalam](http://en.wikipedia.org/wiki/Malayalam_language)**
**മലയാളം** | **`ml`** | **[Udmurt](http://en.wikipedia.org/wiki/Udmurt_language)**
**удмурт** | **`udm`** |
-| **[Finnish](http://en.wikipedia.org/wiki/Finnish_language)**
**Suomi** | **`fi`** | **[Maltese](http://en.wikipedia.org/wiki/Maltese_language)**
**Malti** | **`mt`** | **[Ukrainian](http://en.wikipedia.org/wiki/Ukrainian_language)**
**Українська** | **`uk`** |
-| **[French](http://en.wikipedia.org/wiki/French_language)**
**Français** | **`fr`** | **[Maori](http://en.wikipedia.org/wiki/Maori_language)**
**Māori** | **`mi`** | **[Urdu](http://en.wikipedia.org/wiki/Urdu_language)**
**اُردُو** | **`ur`** |
-| **[Frisian](http://en.wikipedia.org/wiki/Frisian_language)**
**Frysk** | **`fy`** | **[Marathi](http://en.wikipedia.org/wiki/Marathi_language)**
**मराठी** | **`mr`** | **[Uyghur](http://en.wikipedia.org/wiki/Uyghur_language)**
**ئۇيغۇر تىلى** | **`ug`** |
-| **[Galician](http://en.wikipedia.org/wiki/Galician_language)**
**Galego** | **`gl`** | **[Mongolian](http://en.wikipedia.org/wiki/Mongolian_language)**
**Монгол** | **`mn`** | **[Uzbek](http://en.wikipedia.org/wiki/Uzbek_language)**
**Oʻzbek tili** | **`uz`** |
-| **[Georgian](http://en.wikipedia.org/wiki/Georgian_language)**
**ქართული** | **`ka`** | **[Myanmar](http://en.wikipedia.org/wiki/Myanmar_language)**
**မြန်မာစာ** | **`my`** | **[Vietnamese](http://en.wikipedia.org/wiki/Vietnamese_language)**
**Tiếng Việt** | **`vi`** |
-| **[German](http://en.wikipedia.org/wiki/German_language)**
**Deutsch** | **`de`** | **[Nepali](http://en.wikipedia.org/wiki/Nepali_language)**
**नेपाली** | **`ne`** | **[Welsh](http://en.wikipedia.org/wiki/Welsh_language)**
**Cymraeg** | **`cy`** |
-| **[Greek](http://en.wikipedia.org/wiki/Greek_language)**
**Ελληνικά** | **`el`** | **[Norwegian](http://en.wikipedia.org/wiki/Norwegian_language)**
**Norsk** | **`no`** | **[Xhosa](http://en.wikipedia.org/wiki/Xhosa_language)**
**isiXhosa** | **`xh`** |
-| **[Gujarati](http://en.wikipedia.org/wiki/Gujarati_language)**
**ગુજરાતી** | **`gu`** | **[Oriya](http://en.wikipedia.org/wiki/Oriya_language)**
**ଓଡ଼ିଆ** | **`or`** | **[Yiddish](http://en.wikipedia.org/wiki/Yiddish_language)**
**ייִדיש** | **`yi`** |
-| **[Haitian Creole](http://en.wikipedia.org/wiki/Haitian_Creole)**
**Kreyòl Ayisyen** | **`ht`** | **[Papiamento](http://en.wikipedia.org/wiki/Papiamento_language)**
**Papiamentu** | **`pap`** | **[Yoruba](http://en.wikipedia.org/wiki/Yoruba_language)**
**Yorùbá** | **`yo`** |
-| **[Hausa](http://en.wikipedia.org/wiki/Hausa_language)**
**Hausa** | **`ha`** | **[Pashto](http://en.wikipedia.org/wiki/Pashto_language)**
**پښتو** | **`ps`** | **[Yucatec Maya](http://en.wikipedia.org/wiki/Yucatec_Maya)**
**Màaya T'àan** | **`yua`** |
-| **[Hawaiian](http://en.wikipedia.org/wiki/Hawaiian_language)**
**ʻŌlelo Hawaiʻi** | **`haw`** | **[Persian](http://en.wikipedia.org/wiki/Persian_language)**
**فارسی** | **`fa`** | **[Zulu](http://en.wikipedia.org/wiki/Zulu_language)**
**isiZulu** | **`zu`** |
-| **[Hebrew](http://en.wikipedia.org/wiki/Hebrew_language)**
**עִבְרִית** | **`he`** | **[Polish](http://en.wikipedia.org/wiki/Polish_language)**
**Polski** | **`pl`** |
+| **[Afrikaans](http://en.wikipedia.org/wiki/ISO_639:afr)**
**Afrikaans** | **`af`** | **[Hebrew](http://en.wikipedia.org/wiki/ISO_639:heb)**
**עִבְרִית** | **`he`** | **[Portuguese (Brazilian)](http://en.wikipedia.org/wiki/ISO_639:por)**
**Português Brasileiro** | **`pt-BR`** |
+| **[Albanian](http://en.wikipedia.org/wiki/ISO_639:sqi)**
**Shqip** | **`sq`** | **[Hill Mari](http://en.wikipedia.org/wiki/ISO_639:mrj)**
**Кырык мары** | **`mrj`** | **[Portuguese (European)](http://en.wikipedia.org/wiki/ISO_639:por)**
**Português Europeu** | **`pt-PT`** |
+| **[Amharic](http://en.wikipedia.org/wiki/ISO_639:amh)**
**አማርኛ** | **`am`** | **[Hindi](http://en.wikipedia.org/wiki/ISO_639:hin)**
**हिन्दी** | **`hi`** | **[Punjabi](http://en.wikipedia.org/wiki/ISO_639:pan)**
**ਪੰਜਾਬੀ** | **`pa`** |
+| **[Arabic](http://en.wikipedia.org/wiki/ISO_639:ara)**
**العربية** | **`ar`** | **[Hmong](http://en.wikipedia.org/wiki/ISO_639:hmn)**
**Hmoob** | **`hmn`** | **[Quechua](http://en.wikipedia.org/wiki/ISO_639:que)**
**Runasimi** | **`qu`** |
+| **[Armenian](http://en.wikipedia.org/wiki/ISO_639:hye)**
**Հայերեն** | **`hy`** | **[Hungarian](http://en.wikipedia.org/wiki/ISO_639:hun)**
**Magyar** | **`hu`** | **[Querétaro Otomi](http://en.wikipedia.org/wiki/ISO_639:otq)**
**Hñąñho** | **`otq`** |
+| **[Assamese](http://en.wikipedia.org/wiki/ISO_639:asm)**
**অসমীয়া** | **`as`** | **[Icelandic](http://en.wikipedia.org/wiki/ISO_639:isl)**
**Íslenska** | **`is`** | **[Romanian](http://en.wikipedia.org/wiki/ISO_639:ron)**
**Română** | **`ro`** |
+| **[Aymara](http://en.wikipedia.org/wiki/ISO_639:aym)**
**Aymar aru** | **`ay`** | **[Igbo](http://en.wikipedia.org/wiki/ISO_639:ibo)**
**Igbo** | **`ig`** | **[Romansh](http://en.wikipedia.org/wiki/ISO_639:roh)**
**Rumantsch** | **`rm`** |
+| **[Azerbaijani](http://en.wikipedia.org/wiki/ISO_639:aze)**
**Azərbaycanca** | **`az`** | **[Ilocano](http://en.wikipedia.org/wiki/ISO_639:ilo)**
**Ilokano** | **`ilo`** | **[Russian](http://en.wikipedia.org/wiki/ISO_639:rus)**
**Русский** | **`ru`** |
+| **[Bambara](http://en.wikipedia.org/wiki/ISO_639:bam)**
**Bamanankan** | **`bm`** | **[Indonesian](http://en.wikipedia.org/wiki/ISO_639:ind)**
**Bahasa Indonesia** | **`id`** | **[Samoan](http://en.wikipedia.org/wiki/ISO_639:smo)**
**Gagana Sāmoa** | **`sm`** |
+| **[Bashkir](http://en.wikipedia.org/wiki/ISO_639:bak)**
**Башҡортса** | **`ba`** | **[Interlingue](http://en.wikipedia.org/wiki/ISO_639:ile)**
**Interlingue** | **`ie`** | **[Sanskrit](http://en.wikipedia.org/wiki/ISO_639:san)**
**संस्कृतम्** | **`sa`** |
+| **[Basque](http://en.wikipedia.org/wiki/ISO_639:eus)**
**Euskara** | **`eu`** | **[Inuinnaqtun](http://en.wikipedia.org/wiki/ISO_639:ikt)**
**Inuinnaqtun** | **`ikt`** | **[Scots Gaelic](http://en.wikipedia.org/wiki/ISO_639:gla)**
**Gàidhlig** | **`gd`** |
+| **[Belarusian](http://en.wikipedia.org/wiki/ISO_639:bel)**
**беларуская** | **`be`** | **[Inuktitut](http://en.wikipedia.org/wiki/ISO_639:iku)**
**ᐃᓄᒃᑎᑐᑦ** | **`iu`** | **[Sepedi](http://en.wikipedia.org/wiki/ISO_639:nso)**
**Sepedi** | **`nso`** |
+| **[Bengali](http://en.wikipedia.org/wiki/ISO_639:ben)**
**বাংলা** | **`bn`** | **[Inuktitut (Latin)](http://en.wikipedia.org/wiki/ISO_639:iku)**
**Inuktitut** | **`iu-Latn`** | **[Serbian (Cyrillic)](http://en.wikipedia.org/wiki/ISO_639:srp)**
**Српски** | **`sr-Cyrl`** |
+| **[Bhojpuri](http://en.wikipedia.org/wiki/ISO_639:bho)**
**भोजपुरी** | **`bho`** | **[Irish](http://en.wikipedia.org/wiki/ISO_639:gle)**
**Gaeilge** | **`ga`** | **[Serbian (Latin)](http://en.wikipedia.org/wiki/ISO_639:srp)**
**Srpski** | **`sr-Latn`** |
+| **[Bosnian](http://en.wikipedia.org/wiki/ISO_639:bos)**
**Bosanski** | **`bs`** | **[Italian](http://en.wikipedia.org/wiki/ISO_639:ita)**
**Italiano** | **`it`** | **[Sesotho](http://en.wikipedia.org/wiki/ISO_639:sot)**
**Sesotho** | **`st`** |
+| **[Breton](http://en.wikipedia.org/wiki/ISO_639:bre)**
**Brezhoneg** | **`br`** | **[Japanese](http://en.wikipedia.org/wiki/ISO_639:jpn)**
**日本語** | **`ja`** | **[Setswana](http://en.wikipedia.org/wiki/ISO_639:tsn)**
**Setswana** | **`tn`** |
+| **[Bulgarian](http://en.wikipedia.org/wiki/ISO_639:bul)**
**български** | **`bg`** | **[Javanese](http://en.wikipedia.org/wiki/ISO_639:jav)**
**Basa Jawa** | **`jv`** | **[Shona](http://en.wikipedia.org/wiki/ISO_639:sna)**
**chiShona** | **`sn`** |
+| **[Cantonese](http://en.wikipedia.org/wiki/ISO_639:yue)**
**粵語** | **`yue`** | **[Kannada](http://en.wikipedia.org/wiki/ISO_639:kan)**
**ಕನ್ನಡ** | **`kn`** | **[Sindhi](http://en.wikipedia.org/wiki/ISO_639:snd)**
**سنڌي** | **`sd`** |
+| **[Catalan](http://en.wikipedia.org/wiki/ISO_639:cat)**
**Català** | **`ca`** | **[Kazakh](http://en.wikipedia.org/wiki/ISO_639:kaz)**
**Қазақ тілі** | **`kk`** | **[Sinhala](http://en.wikipedia.org/wiki/ISO_639:sin)**
**සිංහල** | **`si`** |
+| **[Cebuano](http://en.wikipedia.org/wiki/ISO_639:ceb)**
**Cebuano** | **`ceb`** | **[Khmer](http://en.wikipedia.org/wiki/ISO_639:khm)**
**ភាសាខ្មែរ** | **`km`** | **[Slovak](http://en.wikipedia.org/wiki/ISO_639:slk)**
**Slovenčina** | **`sk`** |
+| **[Cherokee](http://en.wikipedia.org/wiki/ISO_639:chr)**
**ᏣᎳᎩ** | **`chr`** | **[Kinyarwanda](http://en.wikipedia.org/wiki/ISO_639:kin)**
**Ikinyarwanda** | **`rw`** | **[Slovenian](http://en.wikipedia.org/wiki/ISO_639:slv)**
**Slovenščina** | **`sl`** |
+| **[Chichewa](http://en.wikipedia.org/wiki/ISO_639:nya)**
**Nyanja** | **`ny`** | **[Klingon](http://en.wikipedia.org/wiki/ISO_639:tlh)**
**tlhIngan Hol** | **`tlh-Latn`** | **[Somali](http://en.wikipedia.org/wiki/ISO_639:som)**
**Soomaali** | **`so`** |
+| **[Chinese (Literary)](http://en.wikipedia.org/wiki/ISO_639:lzh)**
**文言** | **`lzh`** | **[Konkani](http://en.wikipedia.org/wiki/ISO_639:gom)**
**कोंकणी** | **`gom`** | **[Spanish](http://en.wikipedia.org/wiki/ISO_639:spa)**
**Español** | **`es`** |
+| **[Chinese (Simplified)](http://en.wikipedia.org/wiki/ISO_639:zho)**
**简体中文** | **`zh-CN`** | **[Korean](http://en.wikipedia.org/wiki/ISO_639:kor)**
**한국어** | **`ko`** | **[Sundanese](http://en.wikipedia.org/wiki/ISO_639:sun)**
**Basa Sunda** | **`su`** |
+| **[Chinese (Traditional)](http://en.wikipedia.org/wiki/ISO_639:zho)**
**繁體中文** | **`zh-TW`** | **[Krio](http://en.wikipedia.org/wiki/ISO_639:kri)**
**Krio** | **`kri`** | **[Swahili](http://en.wikipedia.org/wiki/ISO_639:swa)**
**Kiswahili** | **`sw`** |
+| **[Chuvash](http://en.wikipedia.org/wiki/ISO_639:chv)**
**Чӑвашла** | **`cv`** | **[Kurdish (Central)](http://en.wikipedia.org/wiki/ISO_639:ckb)**
**سۆرانی** | **`ckb`** | **[Swedish](http://en.wikipedia.org/wiki/ISO_639:swe)**
**Svenska** | **`sv`** |
+| **[Corsican](http://en.wikipedia.org/wiki/ISO_639:cos)**
**Corsu** | **`co`** | **[Kurdish (Northern)](http://en.wikipedia.org/wiki/ISO_639:kmr)**
**Kurmancî** | **`ku`** | **[Tahitian](http://en.wikipedia.org/wiki/ISO_639:tah)**
**Reo Tahiti** | **`ty`** |
+| **[Croatian](http://en.wikipedia.org/wiki/ISO_639:hrv)**
**Hrvatski** | **`hr`** | **[Kyrgyz](http://en.wikipedia.org/wiki/ISO_639:kir)**
**Кыргызча** | **`ky`** | **[Tajik](http://en.wikipedia.org/wiki/ISO_639:tgk)**
**Тоҷикӣ** | **`tg`** |
+| **[Czech](http://en.wikipedia.org/wiki/ISO_639:ces)**
**Čeština** | **`cs`** | **[Lao](http://en.wikipedia.org/wiki/ISO_639:lao)**
**ລາວ** | **`lo`** | **[Tamil](http://en.wikipedia.org/wiki/ISO_639:tam)**
**தமிழ்** | **`ta`** |
+| **[Danish](http://en.wikipedia.org/wiki/ISO_639:dan)**
**Dansk** | **`da`** | **[Latin](http://en.wikipedia.org/wiki/ISO_639:lat)**
**Latina** | **`la`** | **[Tatar](http://en.wikipedia.org/wiki/ISO_639:tat)**
**татарча** | **`tt`** |
+| **[Dari](http://en.wikipedia.org/wiki/ISO_639:prs)**
**دری** | **`prs`** | **[Latvian](http://en.wikipedia.org/wiki/ISO_639:lav)**
**Latviešu** | **`lv`** | **[Telugu](http://en.wikipedia.org/wiki/ISO_639:tel)**
**తెలుగు** | **`te`** |
+| **[Dhivehi](http://en.wikipedia.org/wiki/ISO_639:div)**
**ދިވެހި** | **`dv`** | **[Lingala](http://en.wikipedia.org/wiki/ISO_639:lin)**
**Lingála** | **`ln`** | **[Thai](http://en.wikipedia.org/wiki/ISO_639:tha)**
**ไทย** | **`th`** |
+| **[Dogri](http://en.wikipedia.org/wiki/ISO_639:doi)**
**डोगरी** | **`doi`** | **[Lithuanian](http://en.wikipedia.org/wiki/ISO_639:lit)**
**Lietuvių** | **`lt`** | **[Tibetan](http://en.wikipedia.org/wiki/ISO_639:bod)**
**བོད་ཡིག** | **`bo`** |
+| **[Dutch](http://en.wikipedia.org/wiki/ISO_639:nld)**
**Nederlands** | **`nl`** | **[Luganda](http://en.wikipedia.org/wiki/ISO_639:lug)**
**Luganda** | **`lg`** | **[Tigrinya](http://en.wikipedia.org/wiki/ISO_639:tir)**
**ትግርኛ** | **`ti`** |
+| **[Dzongkha](http://en.wikipedia.org/wiki/ISO_639:dzo)**
**རྫོང་ཁ** | **`dz`** | **[Luxembourgish](http://en.wikipedia.org/wiki/ISO_639:ltz)**
**Lëtzebuergesch** | **`lb`** | **[Tongan](http://en.wikipedia.org/wiki/ISO_639:ton)**
**Lea faka-Tonga** | **`to`** |
+| **[Eastern Mari](http://en.wikipedia.org/wiki/ISO_639:mhr)**
**Олык марий** | **`mhr`** | **[Macedonian](http://en.wikipedia.org/wiki/ISO_639:mkd)**
**Македонски** | **`mk`** | **[Tsonga](http://en.wikipedia.org/wiki/ISO_639:tso)**
**Xitsonga** | **`ts`** |
+| **[English](http://en.wikipedia.org/wiki/ISO_639:eng)**
**English** | **`en`** | **[Maithili](http://en.wikipedia.org/wiki/ISO_639:mai)**
**मैथिली** | **`mai`** | **[Turkish](http://en.wikipedia.org/wiki/ISO_639:tur)**
**Türkçe** | **`tr`** |
+| **[Esperanto](http://en.wikipedia.org/wiki/ISO_639:epo)**
**Esperanto** | **`eo`** | **[Malagasy](http://en.wikipedia.org/wiki/ISO_639:mlg)**
**Malagasy** | **`mg`** | **[Turkmen](http://en.wikipedia.org/wiki/ISO_639:tuk)**
**Türkmen** | **`tk`** |
+| **[Estonian](http://en.wikipedia.org/wiki/ISO_639:est)**
**Eesti** | **`et`** | **[Malay](http://en.wikipedia.org/wiki/ISO_639:msa)**
**Bahasa Melayu** | **`ms`** | **[Twi](http://en.wikipedia.org/wiki/ISO_639:twi)**
**Twi** | **`tw`** |
+| **[Ewe](http://en.wikipedia.org/wiki/ISO_639:ewe)**
**Eʋegbe** | **`ee`** | **[Malayalam](http://en.wikipedia.org/wiki/ISO_639:mal)**
**മലയാളം** | **`ml`** | **[Udmurt](http://en.wikipedia.org/wiki/ISO_639:udm)**
**Удмурт** | **`udm`** |
+| **[Faroese](http://en.wikipedia.org/wiki/ISO_639:fao)**
**Føroyskt** | **`fo`** | **[Maltese](http://en.wikipedia.org/wiki/ISO_639:mlt)**
**Malti** | **`mt`** | **[Ukrainian](http://en.wikipedia.org/wiki/ISO_639:ukr)**
**Українська** | **`uk`** |
+| **[Fijian](http://en.wikipedia.org/wiki/ISO_639:fij)**
**Vosa Vakaviti** | **`fj`** | **[Maori](http://en.wikipedia.org/wiki/ISO_639:mri)**
**Māori** | **`mi`** | **[Upper Sorbian](http://en.wikipedia.org/wiki/ISO_639:hsb)**
**Hornjoserbšćina** | **`hsb`** |
+| **[Filipino](http://en.wikipedia.org/wiki/ISO_639:fil)**
**Filipino** | **`tl`** | **[Marathi](http://en.wikipedia.org/wiki/ISO_639:mar)**
**मराठी** | **`mr`** | **[Urdu](http://en.wikipedia.org/wiki/ISO_639:urd)**
**اُردُو** | **`ur`** |
+| **[Finnish](http://en.wikipedia.org/wiki/ISO_639:fin)**
**Suomi** | **`fi`** | **[Meiteilon](http://en.wikipedia.org/wiki/ISO_639:mni)**
**ꯃꯤꯇꯩꯂꯣꯟ** | **`mni-Mtei`** | **[Uyghur](http://en.wikipedia.org/wiki/ISO_639:uig)**
**ئۇيغۇر تىلى** | **`ug`** |
+| **[French](http://en.wikipedia.org/wiki/ISO_639:fra)**
**Français** | **`fr`** | **[Mizo](http://en.wikipedia.org/wiki/ISO_639:lus)**
**Mizo ṭawng** | **`lus`** | **[Uzbek](http://en.wikipedia.org/wiki/ISO_639:uzb)**
**Oʻzbek tili** | **`uz`** |
+| **[French (Canadian)](http://en.wikipedia.org/wiki/ISO_639:fra)**
**Français canadien** | **`fr-CA`** | **[Mongolian](http://en.wikipedia.org/wiki/ISO_639:mon)**
**Монгол** | **`mn`** | **[Vietnamese](http://en.wikipedia.org/wiki/ISO_639:vie)**
**Tiếng Việt** | **`vi`** |
+| **[Frisian](http://en.wikipedia.org/wiki/ISO_639:fry)**
**Frysk** | **`fy`** | **[Mongolian (Traditional)](http://en.wikipedia.org/wiki/ISO_639:mon)**
**ᠮᠣᠩᠭᠣᠯ** | **`mn-Mong`** | **[Volapük](http://en.wikipedia.org/wiki/ISO_639:vol)**
**Volapük** | **`vo`** |
+| **[Galician](http://en.wikipedia.org/wiki/ISO_639:glg)**
**Galego** | **`gl`** | **[Myanmar](http://en.wikipedia.org/wiki/ISO_639:mya)**
**မြန်မာစာ** | **`my`** | **[Welsh](http://en.wikipedia.org/wiki/ISO_639:cym)**
**Cymraeg** | **`cy`** |
+| **[Georgian](http://en.wikipedia.org/wiki/ISO_639:kat)**
**ქართული** | **`ka`** | **[Nepali](http://en.wikipedia.org/wiki/ISO_639:nep)**
**नेपाली** | **`ne`** | **[Wolof](http://en.wikipedia.org/wiki/ISO_639:wol)**
**Wollof** | **`wo`** |
+| **[German](http://en.wikipedia.org/wiki/ISO_639:deu)**
**Deutsch** | **`de`** | **[Norwegian](http://en.wikipedia.org/wiki/ISO_639:nor)**
**Norsk** | **`no`** | **[Xhosa](http://en.wikipedia.org/wiki/ISO_639:xho)**
**isiXhosa** | **`xh`** |
+| **[Greek](http://en.wikipedia.org/wiki/ISO_639:ell)**
**Ελληνικά** | **`el`** | **[Occitan](http://en.wikipedia.org/wiki/ISO_639:oci)**
**Occitan** | **`oc`** | **[Yakut](http://en.wikipedia.org/wiki/ISO_639:sah)**
**Sakha** | **`sah`** |
+| **[Greenlandic](http://en.wikipedia.org/wiki/ISO_639:kal)**
**Kalaallisut** | **`kl`** | **[Odia](http://en.wikipedia.org/wiki/ISO_639:ori)**
**ଓଡ଼ିଆ** | **`or`** | **[Yiddish](http://en.wikipedia.org/wiki/ISO_639:yid)**
**ייִדיש** | **`yi`** |
+| **[Guarani](http://en.wikipedia.org/wiki/ISO_639:gug)**
**Avañe'ẽ** | **`gn`** | **[Oromo](http://en.wikipedia.org/wiki/ISO_639:orm)**
**Afaan Oromoo** | **`om`** | **[Yoruba](http://en.wikipedia.org/wiki/ISO_639:yor)**
**Yorùbá** | **`yo`** |
+| **[Gujarati](http://en.wikipedia.org/wiki/ISO_639:guj)**
**ગુજરાતી** | **`gu`** | **[Papiamento](http://en.wikipedia.org/wiki/ISO_639:pap)**
**Papiamentu** | **`pap`** | **[Yucatec Maya](http://en.wikipedia.org/wiki/ISO_639:yua)**
**Màaya T'àan** | **`yua`** |
+| **[Haitian Creole](http://en.wikipedia.org/wiki/ISO_639:hat)**
**Kreyòl Ayisyen** | **`ht`** | **[Pashto](http://en.wikipedia.org/wiki/ISO_639:pus)**
**پښتو** | **`ps`** | **[Zulu](http://en.wikipedia.org/wiki/ISO_639:zul)**
**isiZulu** | **`zu`** |
+| **[Hausa](http://en.wikipedia.org/wiki/ISO_639:hau)**
**Hausa** | **`ha`** | **[Persian](http://en.wikipedia.org/wiki/ISO_639:fas)**
**فارسی** | **`fa`** |
+| **[Hawaiian](http://en.wikipedia.org/wiki/ISO_639:haw)**
**ʻŌlelo Hawaiʻi** | **`haw`** | **[Polish](http://en.wikipedia.org/wiki/ISO_639:pol)**
**Polski** | **`pl`** |
## Wiki
diff --git a/README.template.md b/README.template.md
index 1d987003..2d3ae081 100644
--- a/README.template.md
+++ b/README.template.md
@@ -66,6 +66,7 @@ In order to be happy, the best way is to be loved by people.
* gawk comes with all GNU/Linux distributions.
* On FreeBSD, gawk is available in the ports.
* On macOS, gawk is available in MacPorts and Homebrew.
+ * Please note that gawk 5.2.0 has a [known bug](https://github.com/soimort/translate-shell/issues/463) -- update to gawk 5.2.1 instead.
* **[GNU Bash](http://www.gnu.org/software/bash/)** or **[Zsh](http://www.zsh.org/)**
* You may use Translate Shell from any Unix shell of your choice (bash, zsh, ksh, tcsh, fish, etc.); however, the wrapper script requires either **bash** or **zsh** installed.
@@ -130,7 +131,7 @@ See **[wiki: Distros](https://github.com/soimort/translate-shell/wiki/Distros)**
Add the following line to your `.zshrc`:
- antigen bundle soimort/translate-shell
+ antigen bundle soimort/translate-shell@develop
### Option #3. From Git
@@ -317,7 +318,7 @@ A browser session will open for viewing the translation (via Google Translate's
### Language Details
-Use the `-list` (`-L`) option to view details of one or more languages:
+Use the `-linguist` (`-L`) option to view details of one or more languages:
$ trans -L fr
$ trans -L de+en
diff --git a/build.awk b/build.awk
index 448397ac..08f5e628 100755
--- a/build.awk
+++ b/build.awk
@@ -4,7 +4,8 @@
# But the build.awk script and the single build should support gawk 4.0+.
@include "include/Commons.awk"
@include "include/Utils.awk"
-@include "include/Languages.awk"
+@include "include/LanguageData.awk"
+@include "include/LanguageHelper.awk"
@include "metainfo.awk"
function init() {
@@ -49,7 +50,7 @@ function man( text) {
return system("pandoc -s -f markdown-smart -t man " ManMarkdown " -o " Man)
}
-function readme( code, col, cols, content, group, i, j, num, language, r, rows, text) {
+function readme( code, col, cols, content, group, i, iso, j, num, r, rows, text) {
text = readFrom(ReadmeTemplate)
content = getOutput("gawk -f translate.awk -- -no-ansi -h")
@@ -81,9 +82,11 @@ function readme( code, col, cols, content, group, i, j, num, language, r, row
r = r "| "
for (j = 0; j < 3; j++)
if (cols[j][i]) {
- split(getName(cols[j][i]), group, " ")
- language = length(group) == 1 ? group[1] "_language" : join(group, "_")
- r = r "**[" getName(cols[j][i]) "](" "http://en.wikipedia.org/wiki/" language ")**
**" getEndonym(cols[j][i]) "** | **`" cols[j][i] "`** | "
+ split(getISO(cols[j][i]), group, "-")
+ iso = group[1]
+
+ r = r "**[" getName(cols[j][i]) "](" "http://en.wikipedia.org/wiki/ISO_639:" iso \
+ ")**
**" getEndonym(cols[j][i]) "** | **`" cols[j][i] "`** | "
}
r = r RS
}
@@ -114,12 +117,12 @@ function wiki( code, group, iso, language, saveSortedIn) {
split(getISO(code), group, "-")
iso = group[1]
- split(getName(code), group, " ")
- language = length(group) == 1 ? group[1] "_language" :
- group[2] ~ /^\(.*\)$/ ? group[1] "_language" : join(group, "_")
+ #split(getName(code), group, " ")
+ #language = length(group) == 1 ? group[1] "_language" :
+ # group[2] ~ /^\(.*\)$/ ? group[1] "_language" : join(group, "_")
print sprintf("| **`%s`**
[`%s`](%s) | **[%s](%s)**
**%s** | %s | `%s` | %s | %s |",
getCode(code), iso, "http://www.ethnologue.com/language/" iso,
- getName(code), "http://en.wikipedia.org/wiki/" language, getEndonym(code),
+ getName(code), "http://en.wikipedia.org/wiki/ISO_639:" iso, getEndonym(code),
getFamily(code), getScript(code),
isRTL(code) ? "✓" : NULLSTR,
hasDictionary(code) ? "✓" : NULLSTR) > WikiLanguages
diff --git a/include/Commons.awk b/include/Commons.awk
index 83b9ef14..658b0bbf 100644
--- a/include/Commons.awk
+++ b/include/Commons.awk
@@ -204,6 +204,8 @@ function escapeChar(char) {
return ">" # Unicode Character 'GREATER-THAN SIGN'
case "u200b":
return "" # Unicode Character 'ZERO WIDTH SPACE'
+ case "u200c":
+ return "" # Unicode Character 'ZERO WIDTH NON-JOINER'
default:
return char
}
diff --git a/include/Help.awk b/include/Help.awk
index 6b848d57..e6398728 100644
--- a/include/Help.awk
+++ b/include/Help.awk
@@ -29,7 +29,7 @@ function getVersion( build, gitHead) {
sprintf("%-22s%s\n", "web browser", Option["browser"] != NONE ?
Option["browser"] :"[NONE]") \
sprintf("%-22s%s (%s)\n", "user locale", UserLocale, getName(UserLang)) \
- sprintf("%-22s%s\n", "home language", Option["hl"]) \
+ sprintf("%-22s%s\n", "host language", Option["hl"]) \
sprintf("%-22s%s\n", "source language", join(Option["sls"], "+")) \
sprintf("%-22s%s\n", "target language", join(Option["tl"], "+")) \
sprintf("%-22s%s\n", "translation engine", Option["engine"]) \
@@ -59,14 +59,22 @@ function getHelp() {
ins(1, ansi("bold", "-M") ", " ansi("bold", "-man")) RS \
ins(2, "Show man page and exit.") RS \
ins(1, ansi("bold", "-T") ", " ansi("bold", "-reference")) RS \
- ins(2, "Print reference table of languages and exit.") RS \
+ ins(2, "Print reference table of languages (in endonyms) and codes, and exit.") RS \
ins(1, ansi("bold", "-R") ", " ansi("bold", "-reference-english")) RS \
- ins(2, "Print reference table of languages (in English names) and exit.") RS \
- ins(1, ansi("bold", "-L ") ansi("underline", "CODES") \
- ", " ansi("bold", "-list ") ansi("underline", "CODES")) RS \
- ins(2, "Print details of languages and exit.") RS \
+ ins(2, "Print reference table of languages (in English names) and codes, and exit.") RS \
ins(1, ansi("bold", "-S") ", " ansi("bold", "-list-engines")) RS \
ins(2, "List available translation engines and exit.") RS \
+ ins(1, ansi("bold", "-list-languages")) RS \
+ ins(2, "List all languages (in endonyms) and exit.") RS \
+ ins(1, ansi("bold", "-list-languages-english")) RS \
+ ins(2, "List all languages (in English names) and exit.") RS \
+ ins(1, ansi("bold", "-list-codes")) RS \
+ ins(2, "List all codes and exit.") RS \
+ ins(1, ansi("bold", "-list-all")) RS \
+ ins(2, "List all languages (endonyms and English names) and codes, and exit.") RS \
+ ins(1, ansi("bold", "-L ") ansi("underline", "CODES") \
+ ", " ansi("bold", "-linguist ") ansi("underline", "CODES")) RS \
+ ins(2, "Print details of languages and exit.") RS \
ins(1, ansi("bold", "-U") ", " ansi("bold", "-upgrade")) RS \
ins(2, "Check for upgrade of this program.") RS \
RS "Translator options:" RS \
@@ -178,10 +186,9 @@ function getHelp() {
", " ansi("bold", "-output ") ansi("underline", "FILENAME")) RS \
ins(2, "Specify the output file.") RS \
RS "Language preference options:" RS \
- ins(1, ansi("bold", "-l ") ansi("underline", "CODE") \
- ", " ansi("bold", "-hl ") ansi("underline", "CODE") \
- ", " ansi("bold", "-lang ") ansi("underline", "CODE")) RS \
- ins(2, "Specify your home language.") RS \
+ ins(1, ansi("bold", "-hl ") ansi("underline", "CODE") \
+ ", " ansi("bold", "-host ") ansi("underline", "CODE")) RS \
+ ins(2, "Specify the host (interface) language.") RS \
ins(1, ansi("bold", "-s ") ansi("underline", "CODES") \
", " ansi("bold", "-sl ") ansi("underline", "CODES") \
", " ansi("bold", "-source ") ansi("underline", "CODES") \
@@ -237,22 +244,30 @@ function showMan( temp) {
# displayName = "endonym" or "name"
function getReference(displayName,
####
- code, col, cols, i, j, name, num, r, rows, saveSortedIn,
+ code, col, cols, colNum, i, j, name, num, offset, r, rows, saveSortedIn,
t1, t2) {
# number of language codes with stable support
num = 0
- for (code in Locale)
- if (Locale[code]["support"] != "unstable")
- num++
- rows = int(num / 3) + (num % 3 ? 1 : 0)
- cols[0][0] = cols[1][0] = cols[2][0] = NULLSTR
+ for (code in Locale) {
+ # only show languages that are supported
+ if (Locale[code]["supported-by"])
+ num++
+ }
+ colNum = (Option["width"] >= 104) ? 4 : 3
+ if (colNum == 4) {
+ rows = int(num / 4) + (num % 4 ? 1 : 0)
+ cols[0][0] = cols[1][0] = cols[2][0] = cols[3][0] = NULLSTR
+ } else {
+ rows = int(num / 3) + (num % 3 ? 1 : 0)
+ cols[0][0] = cols[1][0] = cols[2][0] = NULLSTR
+ }
i = 0
saveSortedIn = PROCINFO["sorted_in"]
PROCINFO["sorted_in"] = displayName == "endonym" ? "@ind_num_asc" :
"compName"
for (code in Locale) {
- # show languages only with stable support
- if (Locale[code]["support"] != "unstable") {
+ # only show languages that are supported
+ if (Locale[code]["supported-by"]) {
col = int(i / rows)
append(cols[col], code)
i++
@@ -261,101 +276,211 @@ function getReference(displayName,
PROCINFO["sorted_in"] = saveSortedIn
if (displayName == "endonym") {
- r = "┌" replicate("─", 25) "┬" replicate("─", 25) "┬" replicate("─", 25) "┐" RS
- for (i = 0; i < rows; i++) {
- r = r "│"
- for (j = 0; j < 3; j++) {
- if (cols[j][i]) {
- t1 = getDisplay(cols[j][i])
- if (length(t1) > 17)
- t1 = substr(t1, 1, 14) "..."
- switch (cols[j][i]) { # fix rendered text width
- case "he":
- t1 = sprintf(" %-20s", t1)
- break
- case "or": case "ur":
- t1 = sprintf(" %-19s", t1)
- break
- case "hi": case "gu": case "km": case "kn":
- case "my": case "ne": case "pa": case "si":
- case "ta": case "te": case "yi":
- t1 = sprintf(" %-18s", t1)
- break
- case "yue":
- t1 = sprintf(" %-15s", t1)
- break
- case "ja": case "ko":
- t1 = sprintf(" %-14s", t1)
- break
- case "zh-CN": case "zh-TW":
- t1 = sprintf(" %-13s", t1)
- break
- default:
- if (length(t1) <= 17)
- t1 = sprintf(" %-17s", t1)
- }
- switch (length(cols[j][i])) {
- case 1: case 2: case 3: case 4:
- t2 = sprintf("- %s │", ansi("bold", sprintf("%4s", cols[j][i])))
- break
- case 5:
- t2 = sprintf("- %s│", ansi("bold", cols[j][i]))
- break
- case 6:
- t2 = sprintf("-%s│", ansi("bold", cols[j][i]))
- break
- case 7:
- t2 = sprintf("-%s", ansi("bold", cols[j][i]))
- break
- default:
- t2 = ansi("bold", cols[j][i])
- }
- r = r t1 t2
- } else
- r = r sprintf("%25s│", NULLSTR)
+ if (colNum == 4) { # 4-column
+ offset = int((Option["width"] - 104) / 4)
+ r = "┌" replicate("─", 25 + offset) "┬" replicate("─", 25 + offset) \
+ "┬" replicate("─", 25 + offset) "┬" replicate("─", 25 + offset) "┐" RS
+ for (i = 0; i < rows; i++) {
+ r = r "│"
+ for (j = 0; j < 4; j++) {
+ if (cols[j][i]) {
+ t1 = getDisplay(cols[j][i])
+ if (length(t1) > 17 + offset)
+ t1 = substr(t1, 1, 14 + offset) "..."
+ switch (cols[j][i]) { # fix rendered text width
+ case "sa":
+ t1 = sprintf(" %-"21+offset"s", t1)
+ break
+ case "he": case "dv":
+ t1 = sprintf(" %-"20+offset"s", t1)
+ break
+ case "bo": case "or": case "ur":
+ t1 = sprintf(" %-"19+offset"s", t1)
+ break
+ case "as": case "gom": case "mai":
+ case "gu": case "hi": case "bho":
+ case "ta": case "te": case "my":
+ case "ne": case "pa": case "km":
+ case "kn": case "yi": case "si":
+ t1 = sprintf(" %-"18+offset"s", t1)
+ break
+ case "lzh": case "yue":
+ t1 = sprintf(" %-"15+offset"s", t1)
+ break
+ case "ja": case "ko":
+ t1 = sprintf(" %-"14+offset"s", t1)
+ break
+ case "zh-CN": case "zh-TW":
+ t1 = sprintf(" %-"13+offset"s", t1)
+ break
+ default:
+ if (length(t1) <= 17+offset)
+ t1 = sprintf(" %-"17+offset"s", t1)
+ }
+ switch (length(cols[j][i])) {
+ case 1: case 2: case 3: case 4:
+ t2 = sprintf("- %s │", ansi("bold", sprintf("%4s", cols[j][i])))
+ break
+ case 5:
+ t2 = sprintf("- %s│", ansi("bold", cols[j][i]))
+ break
+ case 6:
+ t2 = sprintf("-%s│", ansi("bold", cols[j][i]))
+ break
+ case 7:
+ t2 = sprintf("-%s", ansi("bold", cols[j][i]))
+ break
+ default:
+ t2 = ansi("bold", cols[j][i])
+ }
+ r = r t1 t2
+ } else
+ r = r sprintf("%"25+offset"s│", NULLSTR)
+ }
+ r = r RS
}
- r = r RS
+ r = r "└" replicate("─", 25 + offset) "┴" replicate("─", 25 + offset) \
+ "┴" replicate("─", 25 + offset) "┴" replicate("─", 25 + offset) "┘"
+ } else { # fixed-width 3-column
+ r = "┌" replicate("─", 25) "┬" replicate("─", 25) "┬" replicate("─", 25) "┐" RS
+ for (i = 0; i < rows; i++) {
+ r = r "│"
+ for (j = 0; j < 3; j++) {
+ if (cols[j][i]) {
+ t1 = getDisplay(cols[j][i])
+ if (length(t1) > 17)
+ t1 = substr(t1, 1, 14) "..."
+ switch (cols[j][i]) { # fix rendered text width
+ case "sa":
+ t1 = sprintf(" %-21s", t1)
+ break
+ case "he": case "dv":
+ t1 = sprintf(" %-20s", t1)
+ break
+ case "bo": case "or": case "ur":
+ t1 = sprintf(" %-19s", t1)
+ break
+ case "as": case "gom": case "mai":
+ case "gu": case "hi": case "bho":
+ case "ta": case "te": case "my":
+ case "ne": case "pa": case "km":
+ case "kn": case "yi": case "si":
+ t1 = sprintf(" %-18s", t1)
+ break
+ case "lzh": case "yue":
+ t1 = sprintf(" %-15s", t1)
+ break
+ case "ja": case "ko":
+ t1 = sprintf(" %-14s", t1)
+ break
+ case "zh-CN": case "zh-TW":
+ t1 = sprintf(" %-13s", t1)
+ break
+ default:
+ if (length(t1) <= 17)
+ t1 = sprintf(" %-17s", t1)
+ }
+ switch (length(cols[j][i])) {
+ case 1: case 2: case 3: case 4:
+ t2 = sprintf("- %s │", ansi("bold", sprintf("%4s", cols[j][i])))
+ break
+ case 5:
+ t2 = sprintf("- %s│", ansi("bold", cols[j][i]))
+ break
+ case 6:
+ t2 = sprintf("-%s│", ansi("bold", cols[j][i]))
+ break
+ case 7:
+ t2 = sprintf("-%s", ansi("bold", cols[j][i]))
+ break
+ default:
+ t2 = ansi("bold", cols[j][i])
+ }
+ r = r t1 t2
+ } else
+ r = r sprintf("%25s│", NULLSTR)
+ }
+ r = r RS
+ }
+ r = r "└" replicate("─", 25) "┴" replicate("─", 25) "┴" replicate("─", 25) "┘"
}
- r = r "└" replicate("─", 25) "┴" replicate("─", 25) "┴" replicate("─", 25) "┘"
} else {
- r = "┌" replicate("─", 25) "┬" replicate("─", 25) "┬" replicate("─", 25) "┐" RS
- for (i = 0; i < rows; i++) {
- r = r "│"
- for (j = 0; j < 3; j++) {
- if (cols[j][i]) {
- t1 = getName(cols[j][i])
- if (length(t1) > 17)
- t1 = substr(t1, 1, 14) "..."
- t1 = sprintf(" %-17s", t1)
- switch (length(cols[j][i])) {
- case 1: case 2: case 3: case 4:
- t2 = sprintf("- %s │", ansi("bold", sprintf("%4s", cols[j][i])))
- break
- case 5:
- t2 = sprintf("- %s│", ansi("bold", cols[j][i]))
- break
- case 6:
- t2 = sprintf("-%s│", ansi("bold", cols[j][i]))
- break
- case 7:
- t2 = sprintf("-%s", ansi("bold", cols[j][i]))
- break
- default:
- t2 = ansi("bold", cols[j][i])
- }
- r = r t1 t2
- } else
- r = r sprintf("%25s│", NULLSTR)
+ if (colNum == 4) { # 4-column
+ offset = int((Option["width"] - 104) / 4)
+ r = "┌" replicate("─", 25 + offset) "┬" replicate("─", 25 + offset) \
+ "┬" replicate("─", 25 + offset) "┬" replicate("─", 25 + offset) "┐" RS
+ for (i = 0; i < rows; i++) {
+ r = r "│"
+ for (j = 0; j < 4; j++) {
+ if (cols[j][i]) {
+ t1 = getName(cols[j][i])
+ if (length(t1) > 17 + offset)
+ t1 = substr(t1, 1, 14 + offset) "..."
+ t1 = sprintf(" %-"17+offset"s", t1)
+ switch (length(cols[j][i])) {
+ case 1: case 2: case 3: case 4:
+ t2 = sprintf("- %s │", ansi("bold", sprintf("%4s", cols[j][i])))
+ break
+ case 5:
+ t2 = sprintf("- %s│", ansi("bold", cols[j][i]))
+ break
+ case 6:
+ t2 = sprintf("-%s│", ansi("bold", cols[j][i]))
+ break
+ case 7:
+ t2 = sprintf("-%s", ansi("bold", cols[j][i]))
+ break
+ default:
+ t2 = ansi("bold", cols[j][i])
+ }
+ r = r t1 t2
+ } else
+ r = r sprintf("%"25+offset"s│", NULLSTR)
+ }
+ r = r RS
+ }
+ r = r "└" replicate("─", 25 + offset) "┴" replicate("─", 25 + offset) \
+ "┴" replicate("─", 25 + offset) "┴" replicate("─", 25 + offset) "┘"
+ } else { # fixed-width 3-column
+ r = "┌" replicate("─", 25) "┬" replicate("─", 25) "┬" replicate("─", 25) "┐" RS
+ for (i = 0; i < rows; i++) {
+ r = r "│"
+ for (j = 0; j < 3; j++) {
+ if (cols[j][i]) {
+ t1 = getName(cols[j][i])
+ if (length(t1) > 17)
+ t1 = substr(t1, 1, 14) "..."
+ t1 = sprintf(" %-17s", t1)
+ switch (length(cols[j][i])) {
+ case 1: case 2: case 3: case 4:
+ t2 = sprintf("- %s │", ansi("bold", sprintf("%4s", cols[j][i])))
+ break
+ case 5:
+ t2 = sprintf("- %s│", ansi("bold", cols[j][i]))
+ break
+ case 6:
+ t2 = sprintf("-%s│", ansi("bold", cols[j][i]))
+ break
+ case 7:
+ t2 = sprintf("-%s", ansi("bold", cols[j][i]))
+ break
+ default:
+ t2 = ansi("bold", cols[j][i])
+ }
+ r = r t1 t2
+ } else
+ r = r sprintf("%25s│", NULLSTR)
+ }
+ r = r RS
}
- r = r RS
+ r = r "└" replicate("─", 25) "┴" replicate("─", 25) "┴" replicate("─", 25) "┘"
}
- r = r "└" replicate("─", 25) "┴" replicate("─", 25) "┴" replicate("─", 25) "┘"
}
return r
}
# Return detailed information of languages as a string.
-function getList(codes, code, i, r, saveSortedIn) {
+function getLanguage(codes, code, i, r, saveSortedIn) {
r = NULLSTR
if (!isarray(codes))
r = getDetails(codes)
diff --git a/include/Languages.awk b/include/LanguageData.awk
similarity index 59%
rename from include/Languages.awk
rename to include/LanguageData.awk
index f0873ec4..09dac9bd 100644
--- a/include/Languages.awk
+++ b/include/LanguageData.awk
@@ -1,5 +1,5 @@
####################################################################
-# Languages.awk #
+# LanguageData.awk #
####################################################################
# Initialize all locales supported.
@@ -14,7 +14,7 @@
#
function initLocale() {
- #1 Afrikaans
+ # Afrikaans
Locale["af"]["name"] = "Afrikaans"
Locale["af"]["endonym"] = "Afrikaans"
Locale["af"]["translations-of"] = "Vertalings van %s"
@@ -23,24 +23,31 @@ function initLocale() {
Locale["af"]["examples"] = "Voorbeelde"
Locale["af"]["see-also"] = "Sien ook"
Locale["af"]["family"] = "Indo-European"
+ Locale["af"]["branch"] = "West Germanic"
Locale["af"]["iso"] = "afr"
Locale["af"]["glotto"] = "afri1274"
Locale["af"]["script"] = "Latn"
+ Locale["af"]["spoken-in"] = "South Africa; Namibia"
+ Locale["af"]["supported-by"] = "google; bing; yandex"
- #2 Albanian
+ # Albanian
Locale["sq"]["name"] = "Albanian"
Locale["sq"]["endonym"] = "Shqip"
+ Locale["sq"]["endonym2"] = "Gjuha shqipe"
Locale["sq"]["translations-of"] = "Përkthimet e %s"
Locale["sq"]["definitions-of"] = "Përkufizime të %s"
Locale["sq"]["synonyms"] = "Sinonime"
Locale["sq"]["examples"] = "Shembuj"
Locale["sq"]["see-also"] = "Shihni gjithashtu"
Locale["sq"]["family"] = "Indo-European"
+ Locale["sq"]["branch"] = "Paleo-Balkan"
Locale["sq"]["iso"] = "sqi"
Locale["sq"]["glotto"] = "alba1267"
Locale["sq"]["script"] = "Latn"
+ Locale["sq"]["spoken-in"] = "Albania; Kosovo; Montenegro; North Macedonia"
+ Locale["sq"]["supported-by"] = "google; bing; yandex"
- #3 Amharic
+ # Amharic
Locale["am"]["name"] = "Amharic"
Locale["am"]["endonym"] = "አማርኛ"
Locale["am"]["translations-of"] = "የ %s ትርጉሞች"
@@ -49,11 +56,14 @@ function initLocale() {
Locale["am"]["examples"] = "ምሳሌዎች"
Locale["am"]["see-also"] = "የሚከተለውንም ይመልከቱ"
Locale["am"]["family"] = "Afro-Asiatic"
+ Locale["am"]["branch"] = "Semitic"
Locale["am"]["iso"] = "amh"
Locale["am"]["glotto"] = "amha1245"
Locale["am"]["script"] = "Ethi"
+ Locale["am"]["spoken-in"] = "Ethiopia"
+ Locale["am"]["supported-by"] = "google; bing; yandex"
- #4 Arabic (Standard Arabic)
+ # Arabic (Modern Standard Arabic)
Locale["ar"]["name"] = "Arabic"
Locale["ar"]["endonym"] = "العربية"
Locale["ar"]["translations-of"] = "ترجمات %s"
@@ -62,12 +72,15 @@ function initLocale() {
Locale["ar"]["examples"] = "أمثلة"
Locale["ar"]["see-also"] = "انظر أيضًا"
Locale["ar"]["family"] = "Afro-Asiatic"
+ Locale["ar"]["branch"] = "Semitic"
Locale["ar"]["iso"] = "ara"
Locale["ar"]["glotto"] = "stan1318"
Locale["ar"]["script"] = "Arab"
Locale["ar"]["rtl"] = "true" # RTL language
+ Locale["ar"]["spoken-in"] = "the Arab world"
+ Locale["ar"]["supported-by"] = "google; bing; yandex"
- #5 Armenian (Modern Armenian)
+ # Armenian (Eastern Armenian)
Locale["hy"]["name"] = "Armenian"
Locale["hy"]["endonym"] = "Հայերեն"
Locale["hy"]["translations-of"] = "%s-ի թարգմանությունները"
@@ -76,12 +89,48 @@ function initLocale() {
Locale["hy"]["examples"] = "Օրինակներ"
Locale["hy"]["see-also"] = "Տես նաև"
Locale["hy"]["family"] = "Indo-European"
+ #Locale["hy"]["branch"] = "Armenian"
Locale["hy"]["iso"] = "hye"
Locale["hy"]["glotto"] = "nucl1235"
Locale["hy"]["script"] = "Armn"
+ Locale["hy"]["spoken-in"] = "Armenia"
+ Locale["hy"]["supported-by"] = "google; bing; yandex"
- #6 Azerbaijani (North Azerbaijani)
+ # Assamese
+ Locale["as"]["name"] = "Assamese"
+ Locale["as"]["endonym"] = "অসমীয়া"
+ #Locale["as"]["translations-of"]
+ #Locale["as"]["definitions-of"]
+ #Locale["as"]["synonyms"]
+ #Locale["as"]["examples"]
+ #Locale["as"]["see-also"]
+ Locale["as"]["family"] = "Indo-European"
+ Locale["as"]["branch"] = "Indo-Aryan"
+ Locale["as"]["iso"] = "asm"
+ Locale["as"]["glotto"] = "assa1263"
+ Locale["as"]["script"] = "Beng"
+ Locale["as"]["spoken-in"] = "the northeastern Indian state of Assam"
+ Locale["as"]["supported-by"] = "google; bing"
+
+ # Aymara
+ Locale["ay"]["name"] = "Aymara"
+ Locale["ay"]["endonym"] = "Aymar aru"
+ #Locale["ay"]["translations-of"]
+ #Locale["ay"]["definitions-of"]
+ #Locale["ay"]["synonyms"]
+ #Locale["ay"]["examples"]
+ #Locale["ay"]["see-also"]
+ Locale["ay"]["family"] = "Aymaran"
+ #Locale["ay"]["branch"] = "Aymaran"
+ Locale["ay"]["iso"] = "aym"
+ Locale["ay"]["glotto"] = "nucl1667"
+ Locale["ay"]["script"] = "Latn"
+ Locale["ay"]["spoken-in"] = "Bolivia; Peru"
+ Locale["ay"]["supported-by"] = "google"
+
+ # Azerbaijani (North Azerbaijani)
Locale["az"]["name"] = "Azerbaijani"
+ Locale["az"]["name2"] = "Azeri"
Locale["az"]["endonym"] = "Azərbaycanca"
Locale["az"]["translations-of"] = "%s sözünün tərcüməsi"
Locale["az"]["definitions-of"] = "%s sözünün tərifləri"
@@ -89,11 +138,48 @@ function initLocale() {
Locale["az"]["examples"] = "Nümunələr"
Locale["az"]["see-also"] = "Həmçinin, baxın:"
Locale["az"]["family"] = "Turkic"
+ Locale["az"]["branch"] = "Oghuz"
Locale["az"]["iso"] = "aze"
Locale["az"]["glotto"] = "nort2697"
Locale["az"]["script"] = "Latn"
+ Locale["az"]["spoken-in"] = "Azerbaijan"
+ Locale["az"]["supported-by"] = "google; bing; yandex"
+
+ # Bambara
+ Locale["bm"]["name"] = "Bambara"
+ Locale["bm"]["endonym"] = "Bamanankan"
+ Locale["bm"]["endonym2"] = "Bamana"
+ #Locale["bm"]["translations-of"]
+ #Locale["bm"]["definitions-of"]
+ #Locale["bm"]["synonyms"]
+ #Locale["bm"]["examples"]
+ #Locale["bm"]["see-also"]
+ Locale["bm"]["family"] = "Mande"
+ Locale["bm"]["branch"] = "Manding"
+ Locale["bm"]["iso"] = "bam"
+ Locale["bm"]["glotto"] = "bamb1269"
+ Locale["bm"]["script"] = "Latn"
+ Locale["bm"]["spoken-in"] = "Mali"
+ Locale["bm"]["supported-by"] = "google"
+
+ # Bashkir
+ Locale["ba"]["name"] = "Bashkir"
+ Locale["ba"]["endonym"] = "Башҡортса"
+ Locale["ba"]["endonym2"] = "башҡорт теле"
+ #Locale["ba"]["translations-of"]
+ #Locale["ba"]["definitions-of"]
+ #Locale["ba"]["synonyms"]
+ #Locale["ba"]["examples"]
+ #Locale["ba"]["see-also"]
+ Locale["ba"]["family"] = "Turkic"
+ Locale["ba"]["branch"] = "Kipchak"
+ Locale["ba"]["iso"] = "bak"
+ Locale["ba"]["glotto"] = "bash1264"
+ Locale["ba"]["script"] = "Cyrl"
+ Locale["ba"]["spoken-in"] = "the Republic of Bashkortostan in Russia"
+ Locale["ba"]["supported-by"] = "bing; yandex"
- #7 Basque
+ # Basque
Locale["eu"]["name"] = "Basque"
Locale["eu"]["endonym"] = "Euskara"
Locale["eu"]["translations-of"] = "%s esapidearen itzulpena"
@@ -101,12 +187,15 @@ function initLocale() {
Locale["eu"]["synonyms"] = "Sinonimoak"
Locale["eu"]["examples"] = "Adibideak"
Locale["eu"]["see-also"] = "Ikusi hauek ere"
- Locale["eu"]["family"] = "Language Isolate"
+ Locale["eu"]["family"] = "Language isolate"
+ #Locale["eu"]["branch"] = "Language isolate"
Locale["eu"]["iso"] = "eus"
Locale["eu"]["glotto"] = "basq1248"
Locale["eu"]["script"] = "Latn"
+ Locale["eu"]["spoken-in"] = "Euskal Herria in Spain and France"
+ Locale["eu"]["supported-by"] = "google; bing; yandex"
- #8 Belarusian, Cyrillic alphabet
+ # Belarusian, Cyrillic alphabet
Locale["be"]["name"] = "Belarusian"
Locale["be"]["endonym"] = "беларуская"
Locale["be"]["translations-of"] = "Пераклады %s"
@@ -115,11 +204,14 @@ function initLocale() {
Locale["be"]["examples"] = "Прыклады"
Locale["be"]["see-also"] = "Гл. таксама"
Locale["be"]["family"] = "Indo-European"
+ Locale["be"]["branch"] = "East Slavic"
Locale["be"]["iso"] = "bel"
Locale["be"]["glotto"] = "bela1254"
Locale["be"]["script"] = "Cyrl"
+ Locale["be"]["spoken-in"] = "Belarus"
+ Locale["be"]["supported-by"] = "google; yandex"
- #9 Bengali / Bangla
+ # Bengali / Bangla
Locale["bn"]["name"] = "Bengali"
Locale["bn"]["name2"] = "Bangla"
Locale["bn"]["endonym"] = "বাংলা"
@@ -129,11 +221,30 @@ function initLocale() {
Locale["bn"]["examples"] = "উদাহরণ"
Locale["bn"]["see-also"] = "আরো দেখুন"
Locale["bn"]["family"] = "Indo-European"
+ Locale["bn"]["branch"] = "Indo-Aryan"
Locale["bn"]["iso"] = "ben"
Locale["bn"]["glotto"] = "beng1280"
Locale["bn"]["script"] = "Beng"
-
- #10 Bosnian, Latin alphabet
+ Locale["bn"]["spoken-in"] = "Bangladesh; India"
+ Locale["bn"]["supported-by"] = "google; bing; yandex"
+
+ # Bhojpuri
+ Locale["bho"]["name"] = "Bhojpuri"
+ Locale["bho"]["endonym"] = "भोजपुरी"
+ #Locale["bho"]["translations-of"]
+ #Locale["bho"]["definitions-of"]
+ #Locale["bho"]["synonyms"]
+ #Locale["bho"]["examples"]
+ #Locale["bho"]["see-also"]
+ Locale["bho"]["family"] = "Indo-European"
+ Locale["bho"]["branch"] = "Indo-Aryan"
+ Locale["bho"]["iso"] = "bho"
+ Locale["bho"]["glotto"] = "bhoj1246"
+ Locale["bho"]["script"] = "Deva"
+ Locale["bho"]["spoken-in"] = "India; Nepal; Fiji"
+ Locale["bho"]["supported-by"] = "google"
+
+ # Bosnian, Latin alphabet
Locale["bs"]["name"] = "Bosnian"
Locale["bs"]["endonym"] = "Bosanski"
Locale["bs"]["translations-of"] = "Prijevod za: %s"
@@ -142,11 +253,30 @@ function initLocale() {
Locale["bs"]["examples"] = "Primjeri"
Locale["bs"]["see-also"] = "Pogledajte i"
Locale["bs"]["family"] = "Indo-European"
+ Locale["bs"]["branch"] = "South Slavic"
Locale["bs"]["iso"] = "bos"
Locale["bs"]["glotto"] = "bosn1245"
Locale["bs"]["script"] = "Latn"
+ Locale["bs"]["spoken-in"] = "Bosnia and Herzegovina"
+ Locale["bs"]["supported-by"] = "google; bing; yandex"
+
+ # Breton
+ Locale["br"]["name"] = "Breton"
+ Locale["br"]["endonym"] = "Brezhoneg"
+ #Locale["br"]["translations-of"]
+ #Locale["br"]["definitions-of"]
+ #Locale["br"]["synonyms"]
+ #Locale["br"]["examples"]
+ #Locale["br"]["see-also"]
+ Locale["br"]["family"] = "Indo-European"
+ Locale["br"]["branch"] = "Celtic"
+ Locale["br"]["iso"] = "bre"
+ Locale["br"]["glotto"] = "bret1244"
+ Locale["br"]["script"] = "Latn"
+ Locale["br"]["spoken-in"] = "Brittany in France"
+ Locale["br"]["supported-by"] = ""
- #11 Bulgarian
+ # Bulgarian
Locale["bg"]["name"] = "Bulgarian"
Locale["bg"]["endonym"] = "български"
Locale["bg"]["translations-of"] = "Преводи на %s"
@@ -155,11 +285,31 @@ function initLocale() {
Locale["bg"]["examples"] = "Примери"
Locale["bg"]["see-also"] = "Вижте също"
Locale["bg"]["family"] = "Indo-European"
+ Locale["bg"]["branch"] = "South Slavic"
Locale["bg"]["iso"] = "bul"
Locale["bg"]["glotto"] = "bulg1262"
Locale["bg"]["script"] = "Cyrl"
+ Locale["bg"]["spoken-in"] = "Bulgaria"
+ Locale["bg"]["supported-by"] = "google; bing; yandex"
+
+ # Cantonese
+ Locale["yue"]["name"] = "Cantonese"
+ Locale["yue"]["endonym"] = "粵語"
+ Locale["yue"]["endonym2"] = "廣東話"
+ #Locale["yue"]["translations-of"]
+ #Locale["yue"]["definitions-of"]
+ #Locale["yue"]["synonyms"]
+ #Locale["yue"]["examples"]
+ #Locale["yue"]["see-also"]
+ Locale["yue"]["family"] = "Sino-Tibetan"
+ Locale["yue"]["branch"] = "Sinitic"
+ Locale["yue"]["iso"] = "yue"
+ Locale["yue"]["glotto"] = "cant1236"
+ Locale["yue"]["script"] = "Hant"
+ Locale["yue"]["spoken-in"] = "southeastern China; Hong Kong; Macau"
+ Locale["yue"]["supported-by"] = "bing"
- #12 Catalan (Standard Catalan)
+ # Catalan (Standard Catalan)
Locale["ca"]["name"] = "Catalan"
Locale["ca"]["endonym"] = "Català"
Locale["ca"]["translations-of"] = "Traduccions per a %s"
@@ -168,11 +318,14 @@ function initLocale() {
Locale["ca"]["examples"] = "Exemples"
Locale["ca"]["see-also"] = "Vegeu també"
Locale["ca"]["family"] = "Indo-European"
+ Locale["ca"]["branch"] = "Western Romance"
Locale["ca"]["iso"] = "cat"
Locale["ca"]["glotto"] = "stan1289"
Locale["ca"]["script"] = "Latn"
+ Locale["ca"]["spoken-in"] = "Països Catalans in Andorra, Spain, France and Italy"
+ Locale["ca"]["supported-by"] = "google; bing; yandex"
- #13 Cebuano
+ # Cebuano
Locale["ceb"]["name"] = "Cebuano"
Locale["ceb"]["endonym"] = "Cebuano"
Locale["ceb"]["translations-of"] = "%s Mga Paghubad sa PULONG_O_HUGPONG SA PAMULONG"
@@ -181,12 +334,32 @@ function initLocale() {
Locale["ceb"]["examples"] = "Mga pananglitan:"
Locale["ceb"]["see-also"] = "Kitaa pag-usab"
Locale["ceb"]["family"] = "Austronesian"
+ Locale["ceb"]["branch"] = "Malayo-Polynesian"
Locale["ceb"]["iso"] = "ceb"
Locale["ceb"]["glotto"] = "cebu1242"
Locale["ceb"]["script"] = "Latn"
+ Locale["ceb"]["spoken-in"] = "the southern Philippines"
+ Locale["ceb"]["supported-by"] = "google; yandex"
+
+ # Cherokee
+ Locale["chr"]["name"] = "Cherokee"
+ Locale["chr"]["endonym"] = "ᏣᎳᎩ"
+ #Locale["chr"]["translations-of"]
+ #Locale["chr"]["definitions-of"]
+ #Locale["chr"]["synonyms"]
+ #Locale["chr"]["examples"]
+ #Locale["chr"]["see-also"]
+ Locale["chr"]["family"] = "Iroquoian"
+ #Locale["chr"]["branch"]
+ Locale["chr"]["iso"] = "chr"
+ Locale["chr"]["glotto"] = "cher1273"
+ Locale["chr"]["script"] = "Cher"
+ Locale["chr"]["spoken-in"] = "North America"
+ Locale["chr"]["supported-by"] = ""
- #14 Chichewa
+ # Chichewa
Locale["ny"]["name"] = "Chichewa"
+ Locale["ny"]["name2"] = "Chinyanja"
Locale["ny"]["endonym"] = "Nyanja"
Locale["ny"]["translations-of"] = "Matanthauzidwe a %s"
Locale["ny"]["definitions-of"] = "Mamasulidwe a %s"
@@ -194,12 +367,34 @@ function initLocale() {
Locale["ny"]["examples"] = "Zitsanzo"
Locale["ny"]["see-also"] = "Onaninso"
Locale["ny"]["family"] = "Atlantic-Congo"
+ Locale["ny"]["branch"] = "Bantu"
Locale["ny"]["iso"] = "nya"
Locale["ny"]["glotto"] = "nyan1308"
Locale["ny"]["script"] = "Latn"
-
- #15a Chinese (Mandarin), Simplified
- Locale["zh-CN"]["name"] = "Chinese Simplified"
+ Locale["ny"]["spoken-in"] = "Malawi; Zambia"
+ Locale["ny"]["supported-by"] = "google"
+
+ # Chinese (Literary)
+ Locale["lzh"]["name"] = "Chinese (Literary)"
+ #Locale["lzh"]["name2"] = "Literary Chinese"
+ #Locale["lzh"]["name3"] = "Classical Chinese"
+ Locale["lzh"]["endonym"] = "文言"
+ Locale["lzh"]["endonym2"] = "古漢語"
+ #Locale["lzh"]["translations-of"]
+ #Locale["lzh"]["definitions-of"]
+ #Locale["lzh"]["synonyms"]
+ #Locale["lzh"]["examples"]
+ #Locale["lzh"]["see-also"]
+ Locale["lzh"]["family"] = "Sino-Tibetan"
+ Locale["lzh"]["branch"] = "Sinitic"
+ Locale["lzh"]["iso"] = "lzh"
+ Locale["lzh"]["glotto"] = "lite1248"
+ Locale["lzh"]["script"] = "Hans" # should actually be Hant
+ Locale["lzh"]["spoken-in"] = "ancient China"
+ Locale["lzh"]["supported-by"] = "bing"
+
+ # Chinese (Standard Mandarin), Simplified
+ Locale["zh-CN"]["name"] = "Chinese (Simplified)"
Locale["zh-CN"]["endonym"] = "简体中文"
Locale["zh-CN"]["translations-of"] = "%s 的翻译"
Locale["zh-CN"]["definitions-of"] = "%s的定义"
@@ -207,26 +402,51 @@ function initLocale() {
Locale["zh-CN"]["examples"] = "示例"
Locale["zh-CN"]["see-also"] = "另请参阅"
Locale["zh-CN"]["family"] = "Sino-Tibetan"
+ Locale["zh-CN"]["branch"] = "Sinitic"
Locale["zh-CN"]["iso"] = "zho-CN"
Locale["zh-CN"]["glotto"] = "mand1415"
Locale["zh-CN"]["script"] = "Hans"
Locale["zh-CN"]["dictionary"] = "true" # has dictionary
-
- #15b Chinese (Mandarin), Traditional
- Locale["zh-TW"]["name"] = "Chinese Traditional"
- Locale["zh-TW"]["endonym"] = "正體中文"
+ Locale["zh-CN"]["spoken-in"] = "the Greater China regions"
+ Locale["zh-CN"]["written-in"] = "mainland China; Singapore"
+ Locale["zh-CN"]["supported-by"] = "google; bing; yandex"
+
+ # Chinese (Standard Mandarin), Traditional
+ Locale["zh-TW"]["name"] = "Chinese (Traditional)"
+ Locale["zh-TW"]["endonym"] = "繁體中文"
+ Locale["zh-TW"]["endonym2"] = "正體中文"
Locale["zh-TW"]["translations-of"] = "「%s」的翻譯"
Locale["zh-TW"]["definitions-of"] = "「%s」的定義"
Locale["zh-TW"]["synonyms"] = "同義詞"
Locale["zh-TW"]["examples"] = "例句"
Locale["zh-TW"]["see-also"] = "另請參閱"
Locale["zh-TW"]["family"] = "Sino-Tibetan"
+ Locale["zh-TW"]["branch"] = "Sinitic"
Locale["zh-TW"]["iso"] = "zho-TW"
Locale["zh-TW"]["glotto"] = "mand1415"
Locale["zh-TW"]["script"] = "Hant"
Locale["zh-TW"]["dictionary"] = "true" # has dictionary
-
- #16 Corsican
+ Locale["zh-TW"]["spoken-in"] = "the Greater China regions"
+ Locale["zh-TW"]["written-in"] = "Taiwan (Republic of China); Hong Kong; Macau"
+ Locale["zh-TW"]["supported-by"] = "google; bing"
+
+ # Chuvash
+ Locale["cv"]["name"] = "Chuvash"
+ Locale["cv"]["endonym"] = "Чӑвашла"
+ #Locale["cv"]["translations-of"]
+ #Locale["cv"]["definitions-of"]
+ #Locale["cv"]["synonyms"]
+ #Locale["cv"]["examples"]
+ #Locale["cv"]["see-also"]
+ Locale["cv"]["family"] = "Turkic"
+ Locale["cv"]["branch"] = "Oghur"
+ Locale["cv"]["iso"] = "chv"
+ Locale["cv"]["glotto"] = "chuv1255"
+ Locale["cv"]["script"] = "Cyrl"
+ Locale["cv"]["spoken-in"] = "the Chuvash Republic in Russia"
+ Locale["cv"]["supported-by"] = "yandex"
+
+ # Corsican
Locale["co"]["name"] = "Corsican"
Locale["co"]["endonym"] = "Corsu"
Locale["co"]["translations-of"] = "Traductions de %s"
@@ -235,11 +455,14 @@ function initLocale() {
Locale["co"]["examples"] = "Exemples"
Locale["co"]["see-also"] = "Voir aussi"
Locale["co"]["family"] = "Indo-European"
+ Locale["co"]["branch"] = "Italo-Dalmatian"
Locale["co"]["iso"] = "cos"
- Locale["co"]["glotto"] = "cors1242"
+ Locale["co"]["glotto"] = "cors1241"
Locale["co"]["script"] = "Latn"
+ Locale["co"]["spoken-in"] = "Corsica in France; the northern end of the island of Sardinia in Italy"
+ Locale["co"]["supported-by"] = "google"
- #17 Croatian
+ # Croatian
Locale["hr"]["name"] = "Croatian"
Locale["hr"]["endonym"] = "Hrvatski"
Locale["hr"]["translations-of"] = "Prijevodi riječi ili izraza %s"
@@ -248,11 +471,14 @@ function initLocale() {
Locale["hr"]["examples"] = "Primjeri"
Locale["hr"]["see-also"] = "Također pogledajte"
Locale["hr"]["family"] = "Indo-European"
+ Locale["hr"]["branch"] = "South Slavic"
Locale["hr"]["iso"] = "hrv"
Locale["hr"]["glotto"] = "croa1245"
Locale["hr"]["script"] = "Latn"
+ Locale["hr"]["spoken-in"] = "Croatia; Bosnia and Herzegovina"
+ Locale["hr"]["supported-by"] = "google; bing; yandex"
- #18 Czech
+ # Czech
Locale["cs"]["name"] = "Czech"
Locale["cs"]["endonym"] = "Čeština"
Locale["cs"]["translations-of"] = "Překlad výrazu %s"
@@ -261,11 +487,14 @@ function initLocale() {
Locale["cs"]["examples"] = "Příklady"
Locale["cs"]["see-also"] = "Viz také"
Locale["cs"]["family"] = "Indo-European"
+ Locale["cs"]["branch"] = "West Slavic"
Locale["cs"]["iso"] = "ces"
Locale["cs"]["glotto"] = "czec1258"
Locale["cs"]["script"] = "Latn"
+ Locale["cs"]["spoken-in"] = "Czechia"
+ Locale["cs"]["supported-by"] = "google; bing; yandex"
- #19 Danish
+ # Danish
Locale["da"]["name"] = "Danish"
Locale["da"]["endonym"] = "Dansk"
Locale["da"]["translations-of"] = "Oversættelser af %s"
@@ -274,11 +503,66 @@ function initLocale() {
Locale["da"]["examples"] = "Eksempler"
Locale["da"]["see-also"] = "Se også"
Locale["da"]["family"] = "Indo-European"
+ Locale["da"]["branch"] = "North Germanic"
Locale["da"]["iso"] = "dan"
Locale["da"]["glotto"] = "dani1285"
Locale["da"]["script"] = "Latn"
+ Locale["da"]["spoken-in"] = "Denmark; Greenland; the Faroe Islands; the northern German region of Southern Schleswig"
+ Locale["da"]["supported-by"] = "google; bing; yandex"
- #20 Dutch
+ # Dari (Dari Persian)
+ Locale["prs"]["name"] = "Dari"
+ Locale["prs"]["endonym"] = "دری"
+ #Locale["prs"]["translations-of"]
+ #Locale["prs"]["definitions-of"]
+ #Locale["prs"]["synonyms"]
+ #Locale["prs"]["examples"]
+ #Locale["prs"]["see-also"]
+ Locale["prs"]["family"] = "Indo-European"
+ Locale["prs"]["branch"] = "Iranian"
+ Locale["prs"]["iso"] = "prs"
+ Locale["prs"]["glotto"] = "dari1249"
+ Locale["prs"]["script"] = "Arab"
+ Locale["prs"]["rtl"] = "true" # RTL language
+ Locale["prs"]["spoken-in"] = "Afghanistan; Iran"
+ Locale["prs"]["supported-by"] = "bing"
+
+ # Dhivehi
+ Locale["dv"]["name"] = "Dhivehi"
+ Locale["dv"]["name2"] = "Divehi"
+ Locale["dv"]["name3"] = "Maldivian"
+ Locale["dv"]["endonym"] = "ދިވެހި"
+ #Locale["dv"]["translations-of"]
+ #Locale["dv"]["definitions-of"]
+ #Locale["dv"]["synonyms"]
+ #Locale["dv"]["examples"]
+ #Locale["dv"]["see-also"]
+ Locale["dv"]["family"] = "Indo-European"
+ Locale["dv"]["branch"] = "Indo-Aryan"
+ Locale["dv"]["iso"] = "div"
+ Locale["dv"]["glotto"] = "dhiv1236"
+ Locale["dv"]["script"] = "Thaa"
+ Locale["dv"]["rtl"] = "true" # RTL language
+ Locale["dv"]["spoken-in"] = "the Maldives"
+ Locale["dv"]["supported-by"] = "google; bing"
+
+ # Dogri
+ Locale["doi"]["name"] = "Dogri"
+ Locale["doi"]["endonym"] = "डोगरी"
+ #Locale["doi"]["translations-of"]
+ #Locale["doi"]["definitions-of"]
+ #Locale["doi"]["synonyms"]
+ #Locale["doi"]["examples"]
+ #Locale["doi"]["see-also"]
+ Locale["doi"]["family"] = "Indo-European"
+ Locale["doi"]["branch"] = "Indo-Aryan"
+ Locale["doi"]["iso"] = "doi"
+ Locale["doi"]["glotto"] = "indo1311"
+ Locale["doi"]["script"] = "Deva"
+ Locale["doi"]["spoken-in"] = "the Jammu region in northern India"
+ Locale["doi"]["supported-by"] = "google"
+
+ # Dutch
Locale["nl"]["name"] = "Dutch"
Locale["nl"]["endonym"] = "Nederlands"
Locale["nl"]["translations-of"] = "Vertalingen van %s"
@@ -287,12 +571,31 @@ function initLocale() {
Locale["nl"]["examples"] = "Voorbeelden"
Locale["nl"]["see-also"] = "Zie ook"
Locale["nl"]["family"] = "Indo-European"
+ Locale["nl"]["branch"] = "West Germanic"
Locale["nl"]["iso"] = "nld"
Locale["nl"]["glotto"] = "dutc1256"
Locale["nl"]["script"] = "Latn"
Locale["nl"]["dictionary"] = "true" # has dictionary
+ Locale["nl"]["spoken-in"] = "the Netherlands; Belgium; Suriname; Aruba; Curaçao; Sint Maarten; the Caribbean Netherlands"
+ Locale["nl"]["supported-by"] = "google; bing; yandex"
+
+ # Dzongkha
+ Locale["dz"]["name"] = "Dzongkha"
+ Locale["dz"]["endonym"] = "རྫོང་ཁ"
+ #Locale["dz"]["translations-of"]
+ #Locale["dz"]["definitions-of"]
+ #Locale["dz"]["synonyms"]
+ #Locale["dz"]["examples"]
+ #Locale["dz"]["see-also"]
+ Locale["dz"]["family"] = "Sino-Tibetan"
+ Locale["dz"]["branch"] = "Tibetic"
+ Locale["dz"]["iso"] = "dzo"
+ Locale["dz"]["glotto"] = "nucl1307"
+ Locale["dz"]["script"] = "Tibt"
+ Locale["dz"]["spoken-in"] = "Bhutan"
+ Locale["dz"]["supported-by"] = ""
- #21 English (Standard English)
+ # English
Locale["en"]["name"] = "English"
Locale["en"]["endonym"] = "English"
Locale["en"]["translations-of"] = "Translations of %s"
@@ -301,12 +604,15 @@ function initLocale() {
Locale["en"]["examples"] = "Examples"
Locale["en"]["see-also"] = "See also"
Locale["en"]["family"] = "Indo-European"
+ Locale["en"]["branch"] = "West Germanic"
Locale["en"]["iso"] = "eng"
Locale["en"]["glotto"] = "stan1293"
Locale["en"]["script"] = "Latn"
Locale["en"]["dictionary"] = "true" # has dictionary
+ Locale["en"]["spoken-in"] = "worldwide"
+ Locale["en"]["supported-by"] = "google; bing; yandex"
- #22 Esperanto
+ # Esperanto
Locale["eo"]["name"] = "Esperanto"
Locale["eo"]["endonym"] = "Esperanto"
Locale["eo"]["translations-of"] = "Tradukoj de %s"
@@ -314,12 +620,16 @@ function initLocale() {
Locale["eo"]["synonyms"] = "Sinonimoj"
Locale["eo"]["examples"] = "Ekzemploj"
Locale["eo"]["see-also"] = "Vidu ankaŭ"
- Locale["eo"]["family"] = "Artificial Language"
+ Locale["eo"]["family"] = "Constructed language"
+ #Locale["eo"]["branch"]
Locale["eo"]["iso"] = "epo"
Locale["eo"]["glotto"] = "espe1235"
Locale["eo"]["script"] = "Latn"
+ Locale["eo"]["spoken-in"] = "worldwide"
+ Locale["eo"]["description"] = "the world's most widely spoken constructed international auxiliary language, designed to be a universal second language for international communication"
+ Locale["eo"]["supported-by"] = "google; yandex"
- #23 Estonian
+ # Estonian
Locale["et"]["name"] = "Estonian"
Locale["et"]["endonym"] = "Eesti"
Locale["et"]["translations-of"] = "Sõna(de) %s tõlked"
@@ -328,25 +638,80 @@ function initLocale() {
Locale["et"]["examples"] = "Näited"
Locale["et"]["see-also"] = "Vt ka"
Locale["et"]["family"] = "Uralic"
+ Locale["et"]["branch"] = "Finnic"
Locale["et"]["iso"] = "est"
Locale["et"]["glotto"] = "esto1258"
Locale["et"]["script"] = "Latn"
-
- #24 Filipino / Tagalog
+ Locale["et"]["spoken-in"] = "Estonia"
+ Locale["et"]["supported-by"] = "google; bing; yandex"
+
+ # Ewe
+ Locale["ee"]["name"] = "Ewe"
+ Locale["ee"]["endonym"] = "Eʋegbe"
+ #Locale["ee"]["translations-of"]
+ #Locale["ee"]["definitions-of"]
+ #Locale["ee"]["synonyms"]
+ #Locale["ee"]["examples"]
+ #Locale["ee"]["see-also"]
+ Locale["ee"]["family"] = "Atlantic-Congo"
+ Locale["ee"]["branch"] = "Gbe"
+ Locale["ee"]["iso"] = "ewe"
+ Locale["ee"]["glotto"] = "ewee1241"
+ Locale["ee"]["script"] = "Latn"
+ Locale["ee"]["spoken-in"] = "Ghana; Togo; Benin"
+ Locale["ee"]["supported-by"] = "google"
+
+ # Faroese
+ Locale["fo"]["name"] = "Faroese"
+ Locale["fo"]["endonym"] = "Føroyskt"
+ #Locale["fo"]["translations-of"]
+ #Locale["fo"]["definitions-of"]
+ #Locale["fo"]["synonyms"]
+ #Locale["fo"]["examples"]
+ #Locale["fo"]["see-also"]
+ Locale["fo"]["family"] = "Indo-European"
+ Locale["fo"]["branch"] = "North Germanic"
+ Locale["fo"]["iso"] = "fao"
+ Locale["fo"]["glotto"] = "faro1244"
+ Locale["fo"]["script"] = "Latn"
+ Locale["fo"]["spoken-in"] = "the Faroe Islands"
+ Locale["fo"]["supported-by"] = "bing"
+
+ # Fijian
+ Locale["fj"]["name"] = "Fijian"
+ Locale["fj"]["endonym"] = "Vosa Vakaviti"
+ #Locale["fj"]["translations-of"]
+ #Locale["fj"]["definitions-of"]
+ #Locale["fj"]["synonyms"]
+ #Locale["fj"]["examples"]
+ #Locale["fj"]["see-also"]
+ Locale["fj"]["family"] = "Austronesian"
+ Locale["fj"]["branch"] = "Malayo-Polynesian"
+ Locale["fj"]["iso"] = "fij"
+ Locale["fj"]["glotto"] = "fiji1243"
+ Locale["fj"]["script"] = "Latn"
+ Locale["fj"]["spoken-in"] = "Fiji"
+ Locale["fj"]["supported-by"] = "bing"
+
+ # Filipino / Tagalog
Locale["tl"]["name"] = "Filipino"
Locale["tl"]["name2"] = "Tagalog"
- Locale["tl"]["endonym"] = "Tagalog"
+ Locale["tl"]["endonym"] = "Filipino"
+ Locale["tl"]["endonym2"] = "Tagalog"
Locale["tl"]["translations-of"] = "Mga pagsasalin ng %s"
Locale["tl"]["definitions-of"] = "Mga kahulugan ng %s"
Locale["tl"]["synonyms"] = "Mga Kasingkahulugan"
Locale["tl"]["examples"] = "Mga Halimbawa"
Locale["tl"]["see-also"] = "Tingnan rin ang"
Locale["tl"]["family"] = "Austronesian"
- Locale["tl"]["iso"] = "tgl"
- Locale["tl"]["glotto"] = "taga1270"
+ Locale["tl"]["branch"] = "Malayo-Polynesian"
+ Locale["tl"]["iso"] = "fil"
+ Locale["tl"]["glotto"] = "fili1244"
Locale["tl"]["script"] = "Latn"
+ Locale["tl"]["spoken-in"] = "the Philippines"
+ Locale["tl"]["supported-by"] = "google; bing; yandex"
- #25 Finnish
+ # Finnish
Locale["fi"]["name"] = "Finnish"
Locale["fi"]["endonym"] = "Suomi"
Locale["fi"]["translations-of"] = "Käännökset tekstille %s"
@@ -355,11 +720,14 @@ function initLocale() {
Locale["fi"]["examples"] = "Esimerkkejä"
Locale["fi"]["see-also"] = "Katso myös"
Locale["fi"]["family"] = "Uralic"
+ Locale["fi"]["branch"] = "Finnic"
Locale["fi"]["iso"] = "fin"
Locale["fi"]["glotto"] = "finn1318"
Locale["fi"]["script"] = "Latn"
+ Locale["fi"]["spoken-in"] = "Finland"
+ Locale["fi"]["supported-by"] = "google; bing; yandex"
- #26 French (Standard French)
+ # French (Standard French)
Locale["fr"]["name"] = "French"
Locale["fr"]["endonym"] = "Français"
Locale["fr"]["translations-of"] = "Traductions de %s"
@@ -368,12 +736,31 @@ function initLocale() {
Locale["fr"]["examples"] = "Exemples"
Locale["fr"]["see-also"] = "Voir aussi"
Locale["fr"]["family"] = "Indo-European"
+ Locale["fr"]["branch"] = "Western Romance"
Locale["fr"]["iso"] = "fra"
Locale["fr"]["glotto"] = "stan1290"
Locale["fr"]["script"] = "Latn"
Locale["fr"]["dictionary"] = "true" # has dictionary
-
- #27 Galician
+ Locale["fr"]["spoken-in"] = "France; Switzerland; Belgium; Luxembourg"
+ Locale["fr"]["supported-by"] = "google; bing; yandex"
+
+ # French (Canadian French)
+ Locale["fr-CA"]["name"] = "French (Canadian)"
+ Locale["fr-CA"]["endonym"] = "Français canadien"
+ Locale["fr-CA"]["translations-of"] = "Traductions de %s"
+ Locale["fr-CA"]["definitions-of"] = "Définitions de %s"
+ Locale["fr-CA"]["synonyms"] = "Synonymes"
+ Locale["fr-CA"]["examples"] = "Exemples"
+ Locale["fr-CA"]["see-also"] = "Voir aussi"
+ Locale["fr-CA"]["family"] = "Indo-European"
+ Locale["fr-CA"]["branch"] = "Western Romance"
+ Locale["fr-CA"]["iso"] = "fra-CA"
+ Locale["fr-CA"]["glotto"] = "queb1247"
+ Locale["fr-CA"]["script"] = "Latn"
+ Locale["fr-CA"]["spoken-in"] = "Canada"
+ Locale["fr-CA"]["supported-by"] = "bing"
+
+ # Galician
Locale["gl"]["name"] = "Galician"
Locale["gl"]["endonym"] = "Galego"
Locale["gl"]["translations-of"] = "Traducións de %s"
@@ -382,11 +769,14 @@ function initLocale() {
Locale["gl"]["examples"] = "Exemplos"
Locale["gl"]["see-also"] = "Ver tamén"
Locale["gl"]["family"] = "Indo-European"
+ Locale["gl"]["branch"] = "Western Romance"
Locale["gl"]["iso"] = "glg"
Locale["gl"]["glotto"] = "gali1258"
Locale["gl"]["script"] = "Latn"
+ Locale["gl"]["spoken-in"] = "Galicia in northwestern Spain"
+ Locale["gl"]["supported-by"] = "google; bing; yandex"
- #28 Georgian (Modern Georgian)
+ # Georgian (Modern Georgian)
Locale["ka"]["name"] = "Georgian"
Locale["ka"]["endonym"] = "ქართული"
Locale["ka"]["translations-of"] = "%s-ის თარგმანები"
@@ -395,11 +785,14 @@ function initLocale() {
Locale["ka"]["examples"] = "მაგალითები"
Locale["ka"]["see-also"] = "ასევე იხილეთ"
Locale["ka"]["family"] = "Kartvelian"
+ Locale["ka"]["branch"] = "Karto-Zan"
Locale["ka"]["iso"] = "kat"
Locale["ka"]["glotto"] = "nucl1302"
Locale["ka"]["script"] = "Geor"
+ Locale["ka"]["spoken-in"] = "Georgia"
+ Locale["ka"]["supported-by"] = "google; bing; yandex"
- #29 German (Standard German)
+ # German (Standard German)
Locale["de"]["name"] = "German"
Locale["de"]["endonym"] = "Deutsch"
Locale["de"]["translations-of"] = "Übersetzungen für %s"
@@ -408,12 +801,15 @@ function initLocale() {
Locale["de"]["examples"] = "Beispiele"
Locale["de"]["see-also"] = "Siehe auch"
Locale["de"]["family"] = "Indo-European"
+ Locale["de"]["branch"] = "West Germanic"
Locale["de"]["iso"] = "deu"
Locale["de"]["glotto"] = "stan1295"
Locale["de"]["script"] = "Latn"
Locale["de"]["dictionary"] = "true" # has dictionary
+ Locale["de"]["spoken-in"] = "Central Europe"
+ Locale["de"]["supported-by"] = "google; bing; yandex"
- #30 Greek (Modern Greek)
+ # Greek (Modern Greek)
Locale["el"]["name"] = "Greek"
Locale["el"]["endonym"] = "Ελληνικά"
Locale["el"]["translations-of"] = "Μεταφράσεις του %s"
@@ -422,11 +818,46 @@ function initLocale() {
Locale["el"]["examples"] = "Παραδείγματα"
Locale["el"]["see-also"] = "Δείτε επίσης"
Locale["el"]["family"] = "Indo-European"
+ Locale["el"]["branch"] = "Paleo-Balkan"
Locale["el"]["iso"] = "ell"
Locale["el"]["glotto"] = "mode1248"
Locale["el"]["script"] = "Grek"
+ Locale["el"]["spoken-in"] = "Greece; Cyprus; southern Albania"
+ Locale["el"]["supported-by"] = "google; bing; yandex"
+
+ # Greenlandic (West Greenlandic)
+ Locale["kl"]["name"] = "Greenlandic"
+ Locale["kl"]["endonym"] = "Kalaallisut"
+ #Locale["kl"]["translations-of"]
+ #Locale["kl"]["definitions-of"]
+ #Locale["kl"]["synonyms"]
+ #Locale["kl"]["examples"]
+ #Locale["kl"]["see-also"]
+ Locale["kl"]["family"] = "Eskimo-Aleut"
+ Locale["kl"]["branch"] = "Inuit"
+ Locale["kl"]["iso"] = "kal"
+ Locale["kl"]["glotto"] = "kala1399"
+ Locale["kl"]["script"] = "Latn"
+ Locale["kl"]["spoken-in"] = "Greenland"
+ Locale["kl"]["supported-by"] = ""
+
+ # Guarani
+ Locale["gn"]["name"] = "Guarani"
+ Locale["gn"]["endonym"] = "Avañe'ẽ"
+ #Locale["gn"]["translations-of"]
+ #Locale["gn"]["definitions-of"]
+ #Locale["gn"]["synonyms"]
+ #Locale["gn"]["examples"]
+ #Locale["gn"]["see-also"]
+ Locale["gn"]["family"] = "Tupian"
+ #Locale["gn"]["branch"] = "Guaraní"
+ Locale["gn"]["iso"] = "gug"
+ Locale["gn"]["glotto"] = "para1311"
+ Locale["gn"]["script"] = "Latn"
+ Locale["gn"]["spoken-in"] = "Paraguay; Bolivia; Argentina; Brazil"
+ Locale["gn"]["supported-by"] = "google"
- #31 Gujarati
+ # Gujarati
Locale["gu"]["name"] = "Gujarati"
Locale["gu"]["endonym"] = "ગુજરાતી"
Locale["gu"]["translations-of"] = "%s ના અનુવાદ"
@@ -435,11 +866,14 @@ function initLocale() {
Locale["gu"]["examples"] = "ઉદાહરણો"
Locale["gu"]["see-also"] = "આ પણ જુઓ"
Locale["gu"]["family"] = "Indo-European"
+ Locale["gu"]["branch"] = "Indo-Aryan"
Locale["gu"]["iso"] = "guj"
Locale["gu"]["glotto"] = "guja1252"
Locale["gu"]["script"] = "Gujr"
+ Locale["gu"]["spoken-in"] = "the Indian state of Gujarat"
+ Locale["gu"]["supported-by"] = "google; bing; yandex"
- #32 Haitian Creole
+ # Haitian Creole
Locale["ht"]["name"] = "Haitian Creole"
Locale["ht"]["endonym"] = "Kreyòl Ayisyen"
Locale["ht"]["translations-of"] = "Tradiksyon %s"
@@ -448,11 +882,14 @@ function initLocale() {
Locale["ht"]["examples"] = "Egzanp:"
Locale["ht"]["see-also"] = "Wè tou"
Locale["ht"]["family"] = "Indo-European"
+ Locale["ht"]["branch"] = "French Creole"
Locale["ht"]["iso"] = "hat"
Locale["ht"]["glotto"] = "hait1244"
Locale["ht"]["script"] = "Latn"
+ Locale["ht"]["spoken-in"] = "Haiti"
+ Locale["ht"]["supported-by"] = "google; bing; yandex"
- #33 Hawaiian
+ # Hawaiian
Locale["haw"]["name"] = "Hawaiian"
Locale["haw"]["endonym"] = "ʻŌlelo Hawaiʻi"
#Locale["haw"]["translations-of"]
@@ -461,11 +898,14 @@ function initLocale() {
#Locale["haw"]["examples"]
#Locale["haw"]["see-also"]
Locale["haw"]["family"] = "Austronesian"
+ Locale["haw"]["branch"] = "Malayo-Polynesian"
Locale["haw"]["iso"] = "haw"
Locale["haw"]["glotto"] = "hawa1245"
Locale["haw"]["script"] = "Latn"
+ Locale["haw"]["spoken-in"] = "the US state of Hawaii"
+ Locale["haw"]["supported-by"] = "google"
- #34 Hausa, Latin alphabet
+ # Hausa, Latin alphabet
Locale["ha"]["name"] = "Hausa"
Locale["ha"]["endonym"] = "Hausa"
Locale["ha"]["translations-of"] = "Fassarar %s"
@@ -474,11 +914,14 @@ function initLocale() {
Locale["ha"]["examples"] = "Misalai"
Locale["ha"]["see-also"] = "Duba kuma"
Locale["ha"]["family"] = "Afro-Asiatic"
+ Locale["ha"]["branch"] = "Chadic"
Locale["ha"]["iso"] = "hau"
Locale["ha"]["glotto"] = "haus1257"
Locale["ha"]["script"] = "Latn"
+ Locale["ha"]["spoken-in"] = "Chad; Nigeria; Niger; Ghana; Cameroon; Benin"
+ Locale["ha"]["supported-by"] = "google"
- #35 Hebrew
+ # Hebrew
Locale["he"]["name"] = "Hebrew"
Locale["he"]["endonym"] = "עִבְרִית"
Locale["he"]["translations-of"] = "תרגומים של %s"
@@ -487,12 +930,31 @@ function initLocale() {
Locale["he"]["examples"] = "דוגמאות"
Locale["he"]["see-also"] = "ראה גם"
Locale["he"]["family"] = "Afro-Asiatic"
+ Locale["he"]["branch"] = "Semitic"
Locale["he"]["iso"] = "heb"
Locale["he"]["glotto"] = "hebr1245"
Locale["he"]["script"] = "Hebr"
Locale["he"]["rtl"] = "true" # RTL language
+ Locale["he"]["spoken-in"] = "Israel"
+ Locale["he"]["supported-by"] = "google; bing; yandex"
+
+ # Hill Mari / Western Mari
+ Locale["mrj"]["name"] = "Hill Mari"
+ Locale["mrj"]["endonym"] = "Кырык мары"
+ #Locale["mrj"]["translations-of"]
+ #Locale["mrj"]["definitions-of"]
+ #Locale["mrj"]["synonyms"]
+ #Locale["mrj"]["examples"]
+ #Locale["mrj"]["see-also"]
+ Locale["mrj"]["family"] = "Uralic"
+ Locale["mrj"]["branch"] = "Mari"
+ Locale["mrj"]["iso"] = "mrj"
+ Locale["mrj"]["glotto"] = "west2392"
+ Locale["mrj"]["script"] = "Cyrl"
+ Locale["mrj"]["spoken-in"] = "the Gornomariysky, Yurinsky and Kilemarsky districts of Mari El, Russia"
+ Locale["mrj"]["supported-by"] = "yandex"
- #36 Hindi
+ # Hindi
Locale["hi"]["name"] = "Hindi"
Locale["hi"]["endonym"] = "हिन्दी"
Locale["hi"]["translations-of"] = "%s के अनुवाद"
@@ -501,11 +963,14 @@ function initLocale() {
Locale["hi"]["examples"] = "उदाहरण"
Locale["hi"]["see-also"] = "यह भी देखें"
Locale["hi"]["family"] = "Indo-European"
+ Locale["hi"]["branch"] = "Indo-Aryan"
Locale["hi"]["iso"] = "hin"
Locale["hi"]["glotto"] = "hind1269"
Locale["hi"]["script"] = "Deva"
+ Locale["hi"]["spoken-in"] = "India"
+ Locale["hi"]["supported-by"] = "google; bing; yandex"
- #37 Hmong (First Vernacular Hmong)
+ # Hmong (First Vernacular Hmong)
Locale["hmn"]["name"] = "Hmong"
Locale["hmn"]["endonym"] = "Hmoob"
Locale["hmn"]["translations-of"] = "Lus txhais: %s"
@@ -514,11 +979,25 @@ function initLocale() {
#Locale["hmn"]["examples"]
#Locale["hmn"]["see-also"]
Locale["hmn"]["family"] = "Hmong-Mien"
+ Locale["hmn"]["branch"] = "Hmongic"
Locale["hmn"]["iso"] = "hmn"
Locale["hmn"]["glotto"] = "firs1234"
Locale["hmn"]["script"] = "Latn"
-
- #38 Hungarian
+ Locale["hmn"]["spoken-in"] = "China; Vietnam; Laos; Myanmar; Thailand"
+ Locale["hmn"]["supported-by"] = "google; bing"
+
+ # Hmong Daw (White Hmong)
+ #Locale["mww"]["name"] = "Hmong Daw"
+ #Locale["mww"]["endonym"] = "Hmoob Daw"
+ #Locale["mww"]["family"] = "Hmong-Mien"
+ #Locale["mww"]["branch"] = "Hmongic"
+ #Locale["mww"]["iso"] = "mww"
+ #Locale["mww"]["glotto"] = "hmon1333"
+ #Locale["mww"]["script"] = "Latn"
+ #Locale["mww"]["spoken-in"] = "China; Vietnam; Laos; Myanmar; Thailand"
+ #Locale["mww"]["supported-by"] = "bing"
+
+ # Hungarian
Locale["hu"]["name"] = "Hungarian"
Locale["hu"]["endonym"] = "Magyar"
Locale["hu"]["translations-of"] = "%s fordításai"
@@ -527,11 +1006,14 @@ function initLocale() {
Locale["hu"]["examples"] = "Példák"
Locale["hu"]["see-also"] = "Lásd még"
Locale["hu"]["family"] = "Uralic"
+ Locale["hu"]["branch"] = "Ugric"
Locale["hu"]["iso"] = "hun"
Locale["hu"]["glotto"] = "hung1274"
Locale["hu"]["script"] = "Latn"
+ Locale["hu"]["spoken-in"] = "Hungary"
+ Locale["hu"]["supported-by"] = "google; bing; yandex"
- #39 Icelandic
+ # Icelandic
Locale["is"]["name"] = "Icelandic"
Locale["is"]["endonym"] = "Íslenska"
Locale["is"]["translations-of"] = "Þýðingar á %s"
@@ -540,11 +1022,14 @@ function initLocale() {
Locale["is"]["examples"] = "Dæmi"
Locale["is"]["see-also"] = "Sjá einnig"
Locale["is"]["family"] = "Indo-European"
+ Locale["is"]["branch"] = "North Germanic"
Locale["is"]["iso"] = "isl"
Locale["is"]["glotto"] = "icel1247"
Locale["is"]["script"] = "Latn"
+ Locale["is"]["spoken-in"] = "Iceland"
+ Locale["is"]["supported-by"] = "google; bing; yandex"
- #40 Igbo
+ # Igbo
Locale["ig"]["name"] = "Igbo"
Locale["ig"]["endonym"] = "Igbo"
Locale["ig"]["translations-of"] = "Ntụgharị asụsụ nke %s"
@@ -553,11 +1038,30 @@ function initLocale() {
Locale["ig"]["examples"] = "Ọmụmaatụ"
Locale["ig"]["see-also"] = "Hụkwuo"
Locale["ig"]["family"] = "Atlantic-Congo"
+ Locale["ig"]["branch"] = "Igboid"
Locale["ig"]["iso"] = "ibo"
Locale["ig"]["glotto"] = "nucl1417"
Locale["ig"]["script"] = "Latn"
-
- #41 Indonesian
+ Locale["ig"]["spoken-in"] = "southeastern Nigeria"
+ Locale["ig"]["supported-by"] = "google"
+
+ # Ilocano
+ Locale["ilo"]["name"] = "Ilocano"
+ Locale["ilo"]["endonym"] = "Ilokano"
+ #Locale["ilo"]["translations-of"]
+ #Locale["ilo"]["definitions-of"]
+ #Locale["ilo"]["synonyms"]
+ #Locale["ilo"]["examples"]
+ #Locale["ilo"]["see-also"]
+ Locale["ilo"]["family"] = "Austronesian"
+ Locale["ilo"]["branch"] = "Malayo-Polynesian"
+ Locale["ilo"]["iso"] = "ilo"
+ Locale["ilo"]["glotto"] = "ilok1237"
+ Locale["ilo"]["script"] = "Latn"
+ Locale["ilo"]["spoken-in"] = "the northern Philippines"
+ Locale["ilo"]["supported-by"] = "google"
+
+ # Indonesian
Locale["id"]["name"] = "Indonesian"
Locale["id"]["endonym"] = "Bahasa Indonesia"
Locale["id"]["translations-of"] = "Terjemahan dari %s"
@@ -566,12 +1070,82 @@ function initLocale() {
Locale["id"]["examples"] = "Contoh"
Locale["id"]["see-also"] = "Lihat juga"
Locale["id"]["family"] = "Austronesian"
+ Locale["id"]["branch"] = "Malayo-Polynesian"
Locale["id"]["iso"] = "ind"
Locale["id"]["glotto"] = "indo1316"
Locale["id"]["script"] = "Latn"
+ Locale["id"]["spoken-in"] = "Indonesia"
+ Locale["id"]["supported-by"] = "google; bing; yandex"
- #42 Irish
+ # Interlingue
+ Locale["ie"]["name"] = "Interlingue"
+ Locale["ie"]["name2"] = "Occidental"
+ Locale["ie"]["endonym"] = "Interlingue"
+ #Locale["ie"]["translations-of"]
+ #Locale["ie"]["definitions-of"]
+ #Locale["ie"]["synonyms"]
+ #Locale["ie"]["examples"]
+ #Locale["ie"]["see-also"]
+ Locale["ie"]["family"] = "Constructed language"
+ #Locale["ie"]["branch"]
+ Locale["ie"]["iso"] = "ile"
+ Locale["ie"]["glotto"] = "occi1241"
+ Locale["ie"]["script"] = "Latn"
+ Locale["ie"]["spoken-in"] = "worldwide"
+ Locale["ie"]["description"] = "an international auxiliary language"
+ Locale["ie"]["supported-by"] = ""
+
+ # Inuinnaqtun
+ Locale["ikt"]["name"] = "Inuinnaqtun"
+ Locale["ikt"]["endonym"] = "Inuinnaqtun"
+ #Locale["ikt"]["translations-of"]
+ #Locale["ikt"]["definitions-of"]
+ #Locale["ikt"]["synonyms"]
+ #Locale["ikt"]["examples"]
+ #Locale["ikt"]["see-also"]
+ Locale["ikt"]["family"] = "Eskimo-Aleut"
+ Locale["ikt"]["branch"] = "Inuit"
+ Locale["ikt"]["iso"] = "ikt"
+ Locale["ikt"]["glotto"] = "copp1244"
+ Locale["ikt"]["script"] = "Latn"
+ Locale["ikt"]["spoken-in"] = "the Canadian Arctic"
+ Locale["ikt"]["supported-by"] = "bing"
+
+ # Inuktitut (Eastern Canadian Inuktitut)
+ Locale["iu"]["name"] = "Inuktitut"
+ Locale["iu"]["endonym"] = "ᐃᓄᒃᑎᑐᑦ"
+ #Locale["iu"]["translations-of"]
+ #Locale["iu"]["definitions-of"]
+ #Locale["iu"]["synonyms"]
+ #Locale["iu"]["examples"]
+ #Locale["iu"]["see-also"]
+ Locale["iu"]["family"] = "Eskimo-Aleut"
+ Locale["iu"]["branch"] = "Inuit"
+ Locale["iu"]["iso"] = "iku"
+ Locale["iu"]["glotto"] = "east2534"
+ Locale["iu"]["script"] = "Cans"
+ Locale["iu"]["spoken-in"] = "the Canadian Arctic"
+ Locale["iu"]["supported-by"] = "bing"
+
+ # Inuktitut (Eastern Canadian Inuktitut), Latin alphabet
+ Locale["iu-Latn"]["name"] = "Inuktitut (Latin)"
+ Locale["iu-Latn"]["endonym"] = "Inuktitut"
+ #Locale["iu-Latn"]["translations-of"]
+ #Locale["iu-Latn"]["definitions-of"]
+ #Locale["iu-Latn"]["synonyms"]
+ #Locale["iu-Latn"]["examples"]
+ #Locale["iu-Latn"]["see-also"]
+ Locale["iu-Latn"]["family"] = "Eskimo-Aleut"
+ Locale["iu-Latn"]["branch"] = "Inuit"
+ Locale["iu-Latn"]["iso"] = "iku"
+ Locale["iu-Latn"]["glotto"] = "east2534"
+ Locale["iu-Latn"]["script"] = "Latn"
+ Locale["iu-Latn"]["spoken-in"] = "the Canadian Arctic"
+ Locale["iu-Latn"]["supported-by"] = "bing"
+
+ # Irish
Locale["ga"]["name"] = "Irish"
+ Locale["ga"]["name2"] = "Gaelic"
Locale["ga"]["endonym"] = "Gaeilge"
Locale["ga"]["translations-of"] = "Aistriúcháin ar %s"
Locale["ga"]["definitions-of"] = "Sainmhínithe ar %s"
@@ -579,11 +1153,14 @@ function initLocale() {
Locale["ga"]["examples"] = "Samplaí"
Locale["ga"]["see-also"] = "féach freisin"
Locale["ga"]["family"] = "Indo-European"
+ Locale["ga"]["branch"] = "Celtic"
Locale["ga"]["iso"] = "gle"
Locale["ga"]["glotto"] = "iris1253"
Locale["ga"]["script"] = "Latn"
+ Locale["ga"]["spoken-in"] = "Ireland"
+ Locale["ga"]["supported-by"] = "google; bing; yandex"
- #43 Italian
+ # Italian
Locale["it"]["name"] = "Italian"
Locale["it"]["endonym"] = "Italiano"
Locale["it"]["translations-of"] = "Traduzioni di %s"
@@ -592,12 +1169,15 @@ function initLocale() {
Locale["it"]["examples"] = "Esempi"
Locale["it"]["see-also"] = "Vedi anche"
Locale["it"]["family"] = "Indo-European"
+ Locale["it"]["branch"] = "Italo-Dalmatian"
Locale["it"]["iso"] = "ita"
Locale["it"]["glotto"] = "ital1282"
Locale["it"]["script"] = "Latn"
Locale["it"]["dictionary"] = "true" # has dictionary
+ Locale["it"]["spoken-in"] = "Italy; Switzerland; San Marino; Vatican City"
+ Locale["it"]["supported-by"] = "google; bing; yandex"
- #44 Japanese
+ # Japanese
Locale["ja"]["name"] = "Japanese"
Locale["ja"]["endonym"] = "日本語"
Locale["ja"]["translations-of"] = "「%s」の翻訳"
@@ -606,12 +1186,15 @@ function initLocale() {
Locale["ja"]["examples"] = "例"
Locale["ja"]["see-also"] = "関連項目"
Locale["ja"]["family"] = "Japonic"
+ #Locale["ja"]["branch"]
Locale["ja"]["iso"] = "jpn"
Locale["ja"]["glotto"] = "nucl1643"
Locale["ja"]["script"] = "Jpan"
Locale["ja"]["dictionary"] = "true" # has dictionary
+ Locale["ja"]["spoken-in"] = "Japan"
+ Locale["ja"]["supported-by"] = "google; bing; yandex"
- #45 Javanese, Latin alphabet
+ # Javanese, Latin alphabet
Locale["jv"]["name"] = "Javanese"
Locale["jv"]["endonym"] = "Basa Jawa"
Locale["jv"]["translations-of"] = "Terjemahan %s"
@@ -620,11 +1203,14 @@ function initLocale() {
Locale["jv"]["examples"] = "Conto"
Locale["jv"]["see-also"] = "Deleng uga"
Locale["jv"]["family"] = "Austronesian"
+ Locale["jv"]["branch"] = "Malayo-Polynesian"
Locale["jv"]["iso"] = "jav"
Locale["jv"]["glotto"] = "java1254"
Locale["jv"]["script"] = "Latn"
+ Locale["jv"]["spoken-in"] = "Java, Indonesia"
+ Locale["jv"]["supported-by"] = "google; yandex"
- #46 Kannada (Modern Kannada)
+ # Kannada (Modern Kannada)
Locale["kn"]["name"] = "Kannada"
Locale["kn"]["endonym"] = "ಕನ್ನಡ"
Locale["kn"]["translations-of"] = "%s ನ ಅನುವಾದಗಳು"
@@ -633,11 +1219,14 @@ function initLocale() {
Locale["kn"]["examples"] = "ಉದಾಹರಣೆಗಳು"
Locale["kn"]["see-also"] = "ಇದನ್ನೂ ಗಮನಿಸಿ"
Locale["kn"]["family"] = "Dravidian"
+ Locale["kn"]["branch"] = "South Dravidian"
Locale["kn"]["iso"] = "kan"
Locale["kn"]["glotto"] = "nucl1305"
Locale["kn"]["script"] = "Knda"
+ Locale["kn"]["spoken-in"] = "the southwestern India"
+ Locale["kn"]["supported-by"] = "google; bing; yandex"
- #47 Kazakh, Cyrillic alphabet
+ # Kazakh, Cyrillic alphabet
Locale["kk"]["name"] = "Kazakh"
Locale["kk"]["endonym"] = "Қазақ тілі"
Locale["kk"]["translations-of"] = "%s аудармалары"
@@ -646,11 +1235,14 @@ function initLocale() {
Locale["kk"]["examples"] = "Мысалдар"
Locale["kk"]["see-also"] = "Келесі тізімді де көріңіз:"
Locale["kk"]["family"] = "Turkic"
+ Locale["kk"]["branch"] = "Kipchak"
Locale["kk"]["iso"] = "kaz"
Locale["kk"]["glotto"] = "kaza1248"
Locale["kk"]["script"] = "Cyrl"
+ Locale["kk"]["spoken-in"] = "Kazakhstan; China; Mongolia; Russia; Kyrgyzstan; Uzbekistan"
+ Locale["kk"]["supported-by"] = "google; bing; yandex"
- #48 Khmer (Central Khmer)
+ # Khmer (Central Khmer)
Locale["km"]["name"] = "Khmer"
Locale["km"]["endonym"] = "ភាសាខ្មែរ"
Locale["km"]["translations-of"] = "ការបកប្រែនៃ %s"
@@ -659,11 +1251,14 @@ function initLocale() {
Locale["km"]["examples"] = "ឧទាហរណ៍"
Locale["km"]["see-also"] = "មើលផងដែរ"
Locale["km"]["family"] = "Austroasiatic"
+ Locale["km"]["branch"] = "Khmeric"
Locale["km"]["iso"] = "khm"
Locale["km"]["glotto"] = "cent1989"
Locale["km"]["script"] = "Khmr"
+ Locale["km"]["spoken-in"] = "Cambodia; Thailand; Vietnam"
+ Locale["km"]["supported-by"] = "google; bing; yandex"
- #49 Kinyarwanda
+ # Kinyarwanda
Locale["rw"]["name"] = "Kinyarwanda"
Locale["rw"]["endonym"] = "Ikinyarwanda"
#Locale["rw"]["translations-of"]
@@ -672,11 +1267,54 @@ function initLocale() {
#Locale["rw"]["examples"]
#Locale["rw"]["see-also"]
Locale["rw"]["family"] = "Atlantic-Congo"
+ Locale["rw"]["branch"] = "Bantu"
Locale["rw"]["iso"] = "kin"
Locale["rw"]["glotto"] = "kiny1244"
Locale["rw"]["script"] = "Latn"
-
- #50 Korean
+ Locale["rw"]["spoken-in"] = "Rwanda; Uganda; DR Congo; Tanzania"
+ Locale["rw"]["supported-by"] = "google"
+
+ # Klingon, Latin alphabet
+ Locale["tlh-Latn"]["name"] = "Klingon"
+ Locale["tlh-Latn"]["endonym"] = "tlhIngan Hol"
+ Locale["tlh-Latn"]["family"] = "Constructed language"
+ #Locale["tlh-Latn"]["branch"]
+ Locale["tlh-Latn"]["iso"] = "tlh-Latn"
+ Locale["tlh-Latn"]["glotto"] = "klin1234"
+ Locale["tlh-Latn"]["script"] = "Latn"
+ Locale["tlh-Latn"]["spoken-in"] = "the Star Trek universe"
+ Locale["tlh-Latn"]["description"] = "a fictional language spoken by the Klingons in the Star Trek universe"
+ Locale["tlh-Latn"]["supported-by"] = "bing"
+
+ ## Klingon, pIqaD
+ #Locale["tlh-Piqd"]["name"] = "Klingon (pIqaD)"
+ #Locale["tlh-Piqd"]["endonym"] = " "
+ #Locale["tlh-Piqd"]["family"] = "Constructed language"
+ ##Locale["tlh-Piqd"]["branch"]
+ #Locale["tlh-Piqd"]["iso"] = "tlh-Piqd"
+ #Locale["tlh-Piqd"]["glotto"] = "klin1234"
+ #Locale["tlh-Piqd"]["script"] = "Piqd"
+ #Locale["tlh-Piqd"]["spoken-in"] = "the Star Trek universe"
+ #Locale["tlh-Piqd"]["description"] = "a fictional language spoken by the Klingons in the Star Trek universe"
+ #Locale["tlh-Piqd"]["supported-by"] = "bing"
+
+ # Konkani (Goan Konkani)
+ Locale["gom"]["name"] = "Konkani"
+ Locale["gom"]["endonym"] = "कोंकणी"
+ #Locale["gom"]["translations-of"]
+ #Locale["gom"]["definitions-of"]
+ #Locale["gom"]["synonyms"]
+ #Locale["gom"]["examples"]
+ #Locale["gom"]["see-also"]
+ Locale["gom"]["family"] = "Indo-European"
+ Locale["gom"]["branch"] = "Indo-Aryan"
+ Locale["gom"]["iso"] = "gom"
+ Locale["gom"]["glotto"] = "goan1235"
+ Locale["gom"]["script"] = "Deva"
+ Locale["gom"]["spoken-in"] = "the western coastal region of India"
+ Locale["gom"]["supported-by"] = "google"
+
+ # Korean
Locale["ko"]["name"] = "Korean"
Locale["ko"]["endonym"] = "한국어"
Locale["ko"]["translations-of"] = "%s의 번역"
@@ -685,15 +1323,34 @@ function initLocale() {
Locale["ko"]["examples"] = "예문"
Locale["ko"]["see-also"] = "참조"
Locale["ko"]["family"] = "Koreanic"
+ #Locale["ko"]["branch"]
Locale["ko"]["iso"] = "kor"
Locale["ko"]["glotto"] = "kore1280"
Locale["ko"]["script"] = "Kore"
Locale["ko"]["dictionary"] = "true" # has dictionary
-
- #51 Kurdish (Central Kurdish / Sorani), Latin alphabet (Arabic alphabet for Bing)
- Locale["ku"]["name"] = "Kurdish (Central)"
- Locale["ku"]["name2"] = "Sorani"
- Locale["ku"]["endonym"] = "Soranî"
+ Locale["ko"]["spoken-in"] = "South Korea; North Korea; China"
+ Locale["ko"]["supported-by"] = "google; bing; yandex"
+
+ # Krio
+ Locale["kri"]["name"] = "Krio"
+ Locale["kri"]["endonym"] = "Krio"
+ #Locale["kri"]["translations-of"]
+ #Locale["kri"]["definitions-of"]
+ #Locale["kri"]["synonyms"]
+ #Locale["kri"]["examples"]
+ #Locale["kri"]["see-also"]
+ Locale["kri"]["family"] = "Indo-European"
+ Locale["kri"]["branch"] = "English Creole"
+ Locale["kri"]["iso"] = "kri"
+ Locale["kri"]["glotto"] = "krio1253"
+ Locale["kri"]["script"] = "Latn"
+ Locale["kri"]["spoken-in"] = "Sierra Leone"
+ Locale["kri"]["supported-by"] = "google"
+
+ # Kurdish (Northern Kurdish) / Kurmanji
+ Locale["ku"]["name"] = "Kurdish (Northern)"
+ Locale["ku"]["name2"] = "Kurmanji"
+ Locale["ku"]["endonym"] = "Kurmancî"
Locale["ku"]["endonym2"] = "Kurdî"
#Locale["ku"]["translations-of"]
#Locale["ku"]["definitions-of"]
@@ -701,11 +1358,33 @@ function initLocale() {
#Locale["ku"]["examples"]
#Locale["ku"]["see-also"]
Locale["ku"]["family"] = "Indo-European"
- Locale["ku"]["iso"] = "kur"
- Locale["ku"]["glotto"] = "kurd1259"
+ Locale["ku"]["branch"] = "Iranian"
+ Locale["ku"]["iso"] = "kmr"
+ Locale["ku"]["glotto"] = "nort2641"
Locale["ku"]["script"] = "Latn"
-
- #52 Kyrgyz
+ Locale["ku"]["spoken-in"] = "southeast Turkey; northwest and northeast Iran; northern Iraq; northern Syria; the Caucasus and Khorasan regions"
+ Locale["ku"]["supported-by"] = "google"
+
+ # Kurdish (Central Kurdish) / Sorani
+ Locale["ckb"]["name"] = "Kurdish (Central)"
+ Locale["ckb"]["name2"] = "Sorani"
+ Locale["ckb"]["endonym"] = "سۆرانی"
+ Locale["ckb"]["endonym2"] = "کوردیی ناوەندی"
+ #Locale["ckb"]["translations-of"]
+ #Locale["ckb"]["definitions-of"]
+ #Locale["ckb"]["synonyms"]
+ #Locale["ckb"]["examples"]
+ #Locale["ckb"]["see-also"]
+ Locale["ckb"]["family"] = "Indo-European"
+ Locale["ckb"]["branch"] = "Iranian"
+ Locale["ckb"]["iso"] = "ckb"
+ Locale["ckb"]["glotto"] = "cent1972"
+ Locale["ckb"]["script"] = "Arab"
+ Locale["ckb"]["rtl"] = "true" # RTL language
+ Locale["ckb"]["spoken-in"] = "Iraqi Kurdistan; western Iran"
+ Locale["ckb"]["supported-by"] = "google"
+
+ # Kyrgyz, Cyrillic alphabet
Locale["ky"]["name"] = "Kyrgyz"
Locale["ky"]["endonym"] = "Кыргызча"
Locale["ky"]["translations-of"] = "%s котормосу"
@@ -714,11 +1393,14 @@ function initLocale() {
Locale["ky"]["examples"] = "Мисалдар"
Locale["ky"]["see-also"] = "Дагы караңыз"
Locale["ky"]["family"] = "Turkic"
+ Locale["ky"]["branch"] = "Kipchak"
Locale["ky"]["iso"] = "kir"
Locale["ky"]["glotto"] = "kirg1245"
Locale["ky"]["script"] = "Cyrl"
+ Locale["ky"]["spoken-in"] = "Kyrgyzstan; China; Tajikistan; Afghanistan; Pakistan"
+ Locale["ky"]["supported-by"] = "google; bing; yandex"
- #53 Lao
+ # Lao
Locale["lo"]["name"] = "Lao"
Locale["lo"]["endonym"] = "ລາວ"
Locale["lo"]["translations-of"] = "ຄຳແປສຳລັບ %s"
@@ -726,12 +1408,15 @@ function initLocale() {
Locale["lo"]["synonyms"] = "ຄຳທີ່ຄ້າຍກັນ %s"
Locale["lo"]["examples"] = "ຕົວຢ່າງ"
Locale["lo"]["see-also"] = "ເບິ່ງເພີ່ມເຕີມ"
- Locale["lo"]["family"] = "Tai-Kadai"
+ Locale["lo"]["family"] = "Kra-Dai"
+ Locale["lo"]["branch"] = "Tai"
Locale["lo"]["iso"] = "lao"
Locale["lo"]["glotto"] = "laoo1244"
Locale["lo"]["script"] = "Laoo"
+ Locale["lo"]["spoken-in"] = "Laos; Thailand; Cambodia"
+ Locale["lo"]["supported-by"] = "google; bing; yandex"
- #54 Latin
+ # Latin
Locale["la"]["name"] = "Latin"
Locale["la"]["endonym"] = "Latina"
Locale["la"]["translations-of"] = "Versio de %s"
@@ -740,11 +1425,14 @@ function initLocale() {
#Locale["la"]["examples"]
#Locale["la"]["see-also"]
Locale["la"]["family"] = "Indo-European"
+ Locale["la"]["branch"] = "Latino-Faliscan"
Locale["la"]["iso"] = "lat"
Locale["la"]["glotto"] = "lati1261"
Locale["la"]["script"] = "Latn"
+ Locale["la"]["spoken-in"] = "ancient Rome"
+ Locale["la"]["supported-by"] = "google; yandex"
- #55 Latvian
+ # Latvian
Locale["lv"]["name"] = "Latvian"
Locale["lv"]["endonym"] = "Latviešu"
Locale["lv"]["translations-of"] = "%s tulkojumi"
@@ -753,11 +1441,30 @@ function initLocale() {
Locale["lv"]["examples"] = "Piemēri"
Locale["lv"]["see-also"] = "Skatiet arī"
Locale["lv"]["family"] = "Indo-European"
+ Locale["lv"]["branch"] = "Eastern Baltic"
Locale["lv"]["iso"] = "lav"
Locale["lv"]["glotto"] = "latv1249"
Locale["lv"]["script"] = "Latn"
-
- #56 Lithuanian
+ Locale["lv"]["spoken-in"] = "Latvia"
+ Locale["lv"]["supported-by"] = "google; bing; yandex"
+
+ # Lingala
+ Locale["ln"]["name"] = "Lingala"
+ Locale["ln"]["endonym"] = "Lingála"
+ #Locale["ln"]["translations-of"]
+ #Locale["ln"]["definitions-of"]
+ #Locale["ln"]["synonyms"]
+ #Locale["ln"]["examples"]
+ #Locale["ln"]["see-also"]
+ Locale["ln"]["family"] = "Atlantic-Congo"
+ Locale["ln"]["branch"] = "Bantu"
+ Locale["ln"]["iso"] = "lin"
+ Locale["ln"]["glotto"] = "ling1269"
+ Locale["ln"]["script"] = "Latn"
+ Locale["ln"]["spoken-in"] = "DR Congo; Republic of the Congo; Angola; Central African Republic; southern South Sudan"
+ Locale["ln"]["supported-by"] = "google"
+
+ # Lithuanian
Locale["lt"]["name"] = "Lithuanian"
Locale["lt"]["endonym"] = "Lietuvių"
Locale["lt"]["translations-of"] = "„%s“ vertimai"
@@ -766,11 +1473,31 @@ function initLocale() {
Locale["lt"]["examples"] = "Pavyzdžiai"
Locale["lt"]["see-also"] = "Taip pat žiūrėkite"
Locale["lt"]["family"] = "Indo-European"
+ Locale["lt"]["branch"] = "Eastern Baltic"
Locale["lt"]["iso"] = "lit"
Locale["lt"]["glotto"] = "lith1251"
Locale["lt"]["script"] = "Latn"
-
- #57 Luxembourgish
+ Locale["lt"]["spoken-in"] = "Lithuania"
+ Locale["lt"]["supported-by"] = "google; bing; yandex"
+
+ # Luganda
+ Locale["lg"]["name"] = "Luganda"
+ Locale["lg"]["endonym"] = "Luganda"
+ Locale["lg"]["endonym2"] = "Oluganda"
+ #Locale["lg"]["translations-of"]
+ #Locale["lg"]["definitions-of"]
+ #Locale["lg"]["synonyms"]
+ #Locale["lg"]["examples"]
+ #Locale["lg"]["see-also"]
+ Locale["lg"]["family"] = "Atlantic-Congo"
+ Locale["lg"]["branch"] = "Bantu"
+ Locale["lg"]["iso"] = "lug"
+ Locale["lg"]["glotto"] = "gand1255"
+ Locale["lg"]["script"] = "Latn"
+ Locale["lg"]["spoken-in"] = "Uganda; Rwanda"
+ Locale["lg"]["supported-by"] = "google"
+
+ # Luxembourgish
Locale["lb"]["name"] = "Luxembourgish"
Locale["lb"]["endonym"] = "Lëtzebuergesch"
#Locale["lb"]["translations-of"]
@@ -779,11 +1506,14 @@ function initLocale() {
#Locale["lb"]["examples"]
#Locale["lb"]["see-also"]
Locale["lb"]["family"] = "Indo-European"
+ Locale["lb"]["branch"] = "West Germanic"
Locale["lb"]["iso"] = "ltz"
Locale["lb"]["glotto"] = "luxe1241"
Locale["lb"]["script"] = "Latn"
+ Locale["lb"]["spoken-in"] = "Luxembourg"
+ Locale["lb"]["supported-by"] = "google; yandex"
- #58 Macedonian
+ # Macedonian
Locale["mk"]["name"] = "Macedonian"
Locale["mk"]["endonym"] = "Македонски"
Locale["mk"]["translations-of"] = "Преводи на %s"
@@ -792,11 +1522,30 @@ function initLocale() {
Locale["mk"]["examples"] = "Примери"
Locale["mk"]["see-also"] = "Види и"
Locale["mk"]["family"] = "Indo-European"
+ Locale["mk"]["branch"] = "South Slavic"
Locale["mk"]["iso"] = "mkd"
Locale["mk"]["glotto"] = "mace1250"
Locale["mk"]["script"] = "Cyrl"
-
- #59 Malagasy (Plateau Malagasy)
+ Locale["mk"]["spoken-in"] = "North Macedonia; Albania; Bosnia and Herzegovina; Romania; Serbia"
+ Locale["mk"]["supported-by"] = "google; bing; yandex"
+
+ # Maithili
+ Locale["mai"]["name"] = "Maithili"
+ Locale["mai"]["endonym"] = "मैथिली"
+ #Locale["mai"]["translations-of"]
+ #Locale["mai"]["definitions-of"]
+ #Locale["mai"]["synonyms"]
+ #Locale["mai"]["examples"]
+ #Locale["mai"]["see-also"]
+ Locale["mai"]["family"] = "Indo-European"
+ Locale["mai"]["branch"] = "Indo-Aryan"
+ Locale["mai"]["iso"] = "mai"
+ Locale["mai"]["glotto"] = "mait1250"
+ Locale["mai"]["script"] = "Deva"
+ Locale["mai"]["spoken-in"] = "the Mithila region in India and Nepal"
+ Locale["mai"]["supported-by"] = "google"
+
+ # Malagasy (Plateau Malagasy)
Locale["mg"]["name"] = "Malagasy"
Locale["mg"]["endonym"] = "Malagasy"
Locale["mg"]["translations-of"] = "Dikan'ny %s"
@@ -805,11 +1554,14 @@ function initLocale() {
Locale["mg"]["examples"] = "Ohatra"
Locale["mg"]["see-also"] = "Jereo ihany koa"
Locale["mg"]["family"] = "Austronesian"
+ Locale["mg"]["branch"] = "Malayo-Polynesian"
Locale["mg"]["iso"] = "mlg"
Locale["mg"]["glotto"] = "plat1254"
Locale["mg"]["script"] = "Latn"
+ Locale["mg"]["spoken-in"] = "Madagascar; the Comoros; Mayotte"
+ Locale["mg"]["supported-by"] = "google; bing; yandex"
- #60 Malay (Standard Malay)
+ # Malay (Standard Malay), Latin alphabet
Locale["ms"]["name"] = "Malay"
Locale["ms"]["endonym"] = "Bahasa Melayu"
Locale["ms"]["translations-of"] = "Terjemahan %s"
@@ -818,11 +1570,14 @@ function initLocale() {
Locale["ms"]["examples"] = "Contoh"
Locale["ms"]["see-also"] = "Lihat juga"
Locale["ms"]["family"] = "Austronesian"
+ Locale["ms"]["branch"] = "Malayo-Polynesian"
Locale["ms"]["iso"] = "msa"
Locale["ms"]["glotto"] = "stan1306"
Locale["ms"]["script"] = "Latn"
+ Locale["ms"]["spoken-in"] = "Malaysia; Singapore; Indonesia; Brunei; East Timor"
+ Locale["ms"]["supported-by"] = "google; bing; yandex"
- #61 Malayalam
+ # Malayalam
Locale["ml"]["name"] = "Malayalam"
Locale["ml"]["endonym"] = "മലയാളം"
Locale["ml"]["translations-of"] = "%s എന്നതിന്റെ വിവർത്തനങ്ങൾ"
@@ -831,11 +1586,14 @@ function initLocale() {
Locale["ml"]["examples"] = "ഉദാഹരണങ്ങള്"
Locale["ml"]["see-also"] = "ഇതും കാണുക"
Locale["ml"]["family"] = "Dravidian"
+ Locale["ml"]["branch"] = "South Dravidian"
Locale["ml"]["iso"] = "mal"
Locale["ml"]["glotto"] = "mala1464"
Locale["ml"]["script"] = "Mlym"
+ Locale["ml"]["spoken-in"] = "Kerala, Lakshadweep and Puducherry in India"
+ Locale["ml"]["supported-by"] = "google; bing; yandex"
- #62 Maltese
+ # Maltese
Locale["mt"]["name"] = "Maltese"
Locale["mt"]["endonym"] = "Malti"
Locale["mt"]["translations-of"] = "Traduzzjonijiet ta' %s"
@@ -844,11 +1602,14 @@ function initLocale() {
Locale["mt"]["examples"] = "Eżempji"
Locale["mt"]["see-also"] = "Ara wkoll"
Locale["mt"]["family"] = "Afro-Asiatic"
+ Locale["mt"]["branch"] = "Semitic"
Locale["mt"]["iso"] = "mlt"
Locale["mt"]["glotto"] = "malt1254"
Locale["mt"]["script"] = "Latn"
+ Locale["mt"]["spoken-in"] = "Malta"
+ Locale["mt"]["supported-by"] = "google; bing; yandex"
- #63 Maori
+ # Maori
Locale["mi"]["name"] = "Maori"
Locale["mi"]["endonym"] = "Māori"
Locale["mi"]["translations-of"] = "Ngā whakamāoritanga o %s"
@@ -857,11 +1618,14 @@ function initLocale() {
Locale["mi"]["examples"] = "Ngā Tauira:"
Locale["mi"]["see-also"] = "Tiro hoki:"
Locale["mi"]["family"] = "Austronesian"
+ Locale["mi"]["branch"] = "Malayo-Polynesian"
Locale["mi"]["iso"] = "mri"
Locale["mi"]["glotto"] = "maor1246"
Locale["mi"]["script"] = "Latn"
+ Locale["mi"]["spoken-in"] = "New Zealand"
+ Locale["mi"]["supported-by"] = "google; bing; yandex"
- #64 Marathi
+ # Marathi
Locale["mr"]["name"] = "Marathi"
Locale["mr"]["endonym"] = "मराठी"
Locale["mr"]["translations-of"] = "%s ची भाषांतरे"
@@ -870,11 +1634,66 @@ function initLocale() {
Locale["mr"]["examples"] = "उदाहरणे"
Locale["mr"]["see-also"] = "हे देखील पहा"
Locale["mr"]["family"] = "Indo-European"
+ Locale["mr"]["branch"] = "Indo-Aryan"
Locale["mr"]["iso"] = "mar"
Locale["mr"]["glotto"] = "mara1378"
Locale["mr"]["script"] = "Deva"
+ Locale["mr"]["spoken-in"] = "the Indian state of Maharashtra"
+ Locale["mr"]["supported-by"] = "google; bing; yandex"
- #65 Mongolian, Cyrillic alphabet
+ # Mari (Eastern Mari / Meadow Mari)
+ Locale["mhr"]["name"] = "Eastern Mari"
+ Locale["mhr"]["name2"] = "Meadow Mari"
+ Locale["mhr"]["endonym"] = "Олык марий"
+ #Locale["mhr"]["translations-of"]
+ #Locale["mhr"]["definitions-of"]
+ #Locale["mhr"]["synonyms"]
+ #Locale["mhr"]["examples"]
+ #Locale["mhr"]["see-also"]
+ Locale["mhr"]["family"] = "Uralic"
+ Locale["mhr"]["branch"] = "Mari"
+ Locale["mhr"]["iso"] = "mhr"
+ Locale["mhr"]["glotto"] = "east2328"
+ Locale["mhr"]["script"] = "Cyrl"
+ Locale["mhr"]["spoken-in"] = "Mari El, Russia"
+ Locale["mhr"]["supported-by"] = "yandex"
+
+ # Meiteilon / Manipuri
+ Locale["mni-Mtei"]["name"] = "Meiteilon"
+ Locale["mni-Mtei"]["name2"] = "Manipuri"
+ Locale["mni-Mtei"]["name3"] = "Meitei"
+ Locale["mni-Mtei"]["name4"] = "Meetei"
+ Locale["mni-Mtei"]["endonym"] = "ꯃꯤꯇꯩꯂꯣꯟ"
+ #Locale["mni-Mtei"]["translations-of"]
+ #Locale["mni-Mtei"]["definitions-of"]
+ #Locale["mni-Mtei"]["synonyms"]
+ #Locale["mni-Mtei"]["examples"]
+ #Locale["mni-Mtei"]["see-also"]
+ Locale["mni-Mtei"]["family"] = "Sino-Tibetan"
+ Locale["mni-Mtei"]["branch"] = "Tibeto-Burman"
+ Locale["mni-Mtei"]["iso"] = "mni"
+ Locale["mni-Mtei"]["glotto"] = "mani1292"
+ Locale["mni-Mtei"]["script"] = "Mtei"
+ Locale["mni-Mtei"]["spoken-in"] = "the northeastern India; Bangladesh; Myanmar"
+ Locale["mni-Mtei"]["supported-by"] = "google"
+
+ # Mizo
+ Locale["lus"]["name"] = "Mizo"
+ Locale["lus"]["endonym"] = "Mizo ṭawng"
+ #Locale["lus"]["translations-of"]
+ #Locale["lus"]["definitions-of"]
+ #Locale["lus"]["synonyms"]
+ #Locale["lus"]["examples"]
+ #Locale["lus"]["see-also"]
+ Locale["lus"]["family"] = "Sino-Tibetan"
+ Locale["lus"]["branch"] = "Tibeto-Burman"
+ Locale["lus"]["iso"] = "lus"
+ Locale["lus"]["glotto"] = "lush1249"
+ Locale["lus"]["script"] = "Latn"
+ Locale["lus"]["spoken-in"] = "the Indian state of Mizoram"
+ Locale["lus"]["supported-by"] = "google"
+
+ # Mongolian, Cyrillic alphabet
Locale["mn"]["name"] = "Mongolian"
Locale["mn"]["endonym"] = "Монгол"
Locale["mn"]["translations-of"] = "%s-н орчуулга"
@@ -883,11 +1702,30 @@ function initLocale() {
Locale["mn"]["examples"] = "Жишээнүүд"
Locale["mn"]["see-also"] = "Мөн харах"
Locale["mn"]["family"] = "Mongolic"
+ #Locale["mn"]["branch"]
Locale["mn"]["iso"] = "mon"
Locale["mn"]["glotto"] = "mong1331"
Locale["mn"]["script"] = "Cyrl"
-
- #66 Myanmar / Burmese
+ Locale["mn"]["spoken-in"] = "Mongolia; Inner Mongolia in China"
+ Locale["mn"]["supported-by"] = "google; bing; yandex"
+
+ # Mongolian, traditional Mongolian alphabet
+ Locale["mn-Mong"]["name"] = "Mongolian (Traditional)"
+ Locale["mn-Mong"]["endonym"] = "ᠮᠣᠩᠭᠣᠯ"
+ #Locale["mn-Mong"]["translations-of"]
+ #Locale["mn-Mong"]["definitions-of"]
+ #Locale["mn-Mong"]["synonyms"]
+ #Locale["mn-Mong"]["examples"]
+ #Locale["mn-Mong"]["see-also"]
+ Locale["mn-Mong"]["family"] = "Mongolic"
+ #Locale["mn-Mong"]["branch"]
+ Locale["mn-Mong"]["iso"] = "mon-Mong"
+ Locale["mn-Mong"]["glotto"] = "mong1331"
+ Locale["mn-Mong"]["script"] = "Mong"
+ Locale["mn-Mong"]["spoken-in"] = "Mongolia; Inner Mongolia in China"
+ Locale["mn-Mong"]["supported-by"] = "bing"
+
+ # Myanmar / Burmese
Locale["my"]["name"] = "Myanmar"
Locale["my"]["name2"] = "Burmese"
Locale["my"]["endonym"] = "မြန်မာစာ"
@@ -897,11 +1735,14 @@ function initLocale() {
Locale["my"]["examples"] = "ဥပမာ"
Locale["my"]["see-also"] = "ဖော်ပြပါများကိုလဲ ကြည့်ပါ"
Locale["my"]["family"] = "Sino-Tibetan"
+ Locale["my"]["branch"] = "Tibeto-Burman"
Locale["my"]["iso"] = "mya"
Locale["my"]["glotto"] = "nucl1310"
Locale["my"]["script"] = "Mymr"
+ Locale["my"]["spoken-in"] = "Myanmar"
+ Locale["my"]["supported-by"] = "google; bing; yandex"
- #67 Nepali
+ # Nepali
Locale["ne"]["name"] = "Nepali"
Locale["ne"]["endonym"] = "नेपाली"
Locale["ne"]["translations-of"] = "%sका अनुवाद"
@@ -910,11 +1751,14 @@ function initLocale() {
Locale["ne"]["examples"] = "उदाहरणहरु"
Locale["ne"]["see-also"] = "यो पनि हेर्नुहोस्"
Locale["ne"]["family"] = "Indo-European"
+ Locale["ne"]["branch"] = "Indo-Aryan"
Locale["ne"]["iso"] = "nep"
Locale["ne"]["glotto"] = "nepa1254"
Locale["ne"]["script"] = "Deva"
+ Locale["ne"]["spoken-in"] = "Nepal; India"
+ Locale["ne"]["supported-by"] = "google; bing; yandex"
- #68 Norwegian
+ # Norwegian
Locale["no"]["name"] = "Norwegian"
Locale["no"]["endonym"] = "Norsk"
Locale["no"]["translations-of"] = "Oversettelser av %s"
@@ -923,12 +1767,32 @@ function initLocale() {
Locale["no"]["examples"] = "Eksempler"
Locale["no"]["see-also"] = "Se også"
Locale["no"]["family"] = "Indo-European"
+ Locale["no"]["branch"] = "North Germanic"
Locale["no"]["iso"] = "nor"
Locale["no"]["glotto"] = "norw1258"
Locale["no"]["script"] = "Latn"
+ Locale["no"]["spoken-in"] = "Norway"
+ Locale["no"]["supported-by"] = "google; bing; yandex"
+
+ # Occitan
+ Locale["oc"]["name"] = "Occitan"
+ Locale["oc"]["endonym"] = "Occitan"
+ #Locale["oc"]["translations-of"]
+ #Locale["oc"]["definitions-of"]
+ #Locale["oc"]["synonyms"]
+ #Locale["oc"]["examples"]
+ #Locale["oc"]["see-also"]
+ Locale["oc"]["family"] = "Indo-European"
+ Locale["oc"]["branch"] = "Western Romance"
+ Locale["oc"]["iso"] = "oci"
+ Locale["oc"]["glotto"] = "occi1239"
+ Locale["oc"]["script"] = "Latn"
+ Locale["oc"]["spoken-in"] = "Occitania in France, Monaco, Italy and Spain"
+ Locale["oc"]["supported-by"] = ""
- #69 Odia / Oriya
+ # Odia / Oriya
Locale["or"]["name"] = "Odia"
+ Locale["or"]["name2"] = "Oriya"
Locale["or"]["endonym"] = "ଓଡ଼ିଆ"
#Locale["or"]["translations-of"]
#Locale["or"]["definitions-of"]
@@ -936,11 +1800,46 @@ function initLocale() {
#Locale["or"]["examples"]
#Locale["or"]["see-also"]
Locale["or"]["family"] = "Indo-European"
+ Locale["or"]["branch"] = "Indo-Aryan"
Locale["or"]["iso"] = "ori"
Locale["or"]["glotto"] = "macr1269"
Locale["or"]["script"] = "Orya"
+ Locale["or"]["spoken-in"] = "the Indian state of Odisha"
+ Locale["or"]["supported-by"] = "google; bing"
+
+ # Oromo
+ Locale["om"]["name"] = "Oromo"
+ Locale["om"]["endonym"] = "Afaan Oromoo"
+ #Locale["om"]["translations-of"]
+ #Locale["om"]["definitions-of"]
+ #Locale["om"]["synonyms"]
+ #Locale["om"]["examples"]
+ #Locale["om"]["see-also"]
+ Locale["om"]["family"] = "Afro-Asiatic"
+ Locale["om"]["branch"] = "Cushitic"
+ Locale["om"]["iso"] = "orm"
+ Locale["om"]["glotto"] = "nucl1736"
+ Locale["om"]["script"] = "Latn"
+ Locale["om"]["spoken-in"] = "the Ethiopian state of Oromia; northeastern Kenya"
+ Locale["om"]["supported-by"] = "google"
+
+ # Papiamento
+ Locale["pap"]["name"] = "Papiamento"
+ Locale["pap"]["endonym"] = "Papiamentu"
+ #Locale["pap"]["translations-of"]
+ #Locale["pap"]["definitions-of"]
+ #Locale["pap"]["synonyms"]
+ #Locale["pap"]["examples"]
+ #Locale["pap"]["see-also"]
+ Locale["pap"]["family"] = "Indo-European"
+ Locale["pap"]["branch"] = "Portuguese Creole"
+ Locale["pap"]["iso"] = "pap"
+ Locale["pap"]["glotto"] = "papi1253"
+ Locale["pap"]["script"] = "Latn"
+ Locale["pap"]["spoken-in"] = "the Dutch Caribbean"
+ Locale["pap"]["supported-by"] = "yandex"
- #70 Pashto / Pushto
+ # Pashto / Pushto
Locale["ps"]["name"] = "Pashto"
Locale["ps"]["name2"] = "Pushto"
Locale["ps"]["endonym"] = "پښتو"
@@ -950,12 +1849,15 @@ function initLocale() {
Locale["ps"]["examples"] = "بېلګې"
Locale["ps"]["see-also"] = "دا هم ووینئ"
Locale["ps"]["family"] = "Indo-European"
+ Locale["ps"]["branch"] = "Iranian"
Locale["ps"]["iso"] = "pus"
Locale["ps"]["glotto"] = "pash1269"
Locale["ps"]["script"] = "Arab"
Locale["ps"]["rtl"] = "true" # RTL language
+ Locale["ps"]["spoken-in"] = "Afghanistan; Pakistan"
+ Locale["ps"]["supported-by"] = "google; bing"
- #71 Persian / Farsi (Western Farsi / Iranian Persian)
+ # Persian / Farsi (Western Farsi / Iranian Persian)
Locale["fa"]["name"] = "Persian"
Locale["fa"]["name2"] = "Farsi"
Locale["fa"]["endonym"] = "فارسی"
@@ -965,12 +1867,15 @@ function initLocale() {
Locale["fa"]["examples"] = "مثالها"
Locale["fa"]["see-also"] = "همچنین مراجعه کنید به"
Locale["fa"]["family"] = "Indo-European"
+ Locale["fa"]["branch"] = "Iranian"
Locale["fa"]["iso"] = "fas"
Locale["fa"]["glotto"] = "west2369"
Locale["fa"]["script"] = "Arab"
Locale["fa"]["rtl"] = "true" # RTL language
+ Locale["fa"]["spoken-in"] = "Iran"
+ Locale["fa"]["supported-by"] = "google; bing; yandex"
- #72 Polish
+ # Polish
Locale["pl"]["name"] = "Polish"
Locale["pl"]["endonym"] = "Polski"
Locale["pl"]["translations-of"] = "Tłumaczenia %s"
@@ -979,11 +1884,14 @@ function initLocale() {
Locale["pl"]["examples"] = "Przykłady"
Locale["pl"]["see-also"] = "Zobacz też"
Locale["pl"]["family"] = "Indo-European"
+ Locale["pl"]["branch"] = "West Slavic"
Locale["pl"]["iso"] = "pol"
Locale["pl"]["glotto"] = "poli1260"
Locale["pl"]["script"] = "Latn"
+ Locale["pl"]["spoken-in"] = "Poland"
+ Locale["pl"]["supported-by"] = "google; bing; yandex"
- #73 Portuguese (Brazilian)
+ # Portuguese (Brazilian)
Locale["pt-BR"]["name"] = "Portuguese (Brazilian)"
Locale["pt-BR"]["endonym"] = "Português Brasileiro"
Locale["pt-BR"]["translations-of"] = "Traduções de %s"
@@ -992,12 +1900,31 @@ function initLocale() {
Locale["pt-BR"]["examples"] = "Exemplos"
Locale["pt-BR"]["see-also"] = "Veja também"
Locale["pt-BR"]["family"] = "Indo-European"
+ Locale["pt-BR"]["branch"] = "Western Romance"
Locale["pt-BR"]["iso"] = "por"
Locale["pt-BR"]["glotto"] = "braz1246"
Locale["pt-BR"]["script"] = "Latn"
Locale["pt-BR"]["dictionary"] = "true" # has dictionary
+ Locale["pt-BR"]["spoken-in"] = "Portugal; Brazil; Cape Verde; Angola; Mozambique; Guinea-Bissau; Equatorial Guinea; São Tomé and Príncipe; East Timor; Macau"
+ Locale["pt-BR"]["supported-by"] = "google; bing; yandex"
- #74 Punjabi, Gurmukhī alphabet
+ # Portuguese (European)
+ Locale["pt-PT"]["name"] = "Portuguese (European)"
+ Locale["pt-PT"]["endonym"] = "Português Europeu"
+ Locale["pt-PT"]["translations-of"] = "Traduções de %s"
+ Locale["pt-PT"]["definitions-of"] = "Definições de %s"
+ Locale["pt-PT"]["synonyms"] = "Sinônimos"
+ Locale["pt-PT"]["examples"] = "Exemplos"
+ Locale["pt-PT"]["see-also"] = "Veja também"
+ Locale["pt-PT"]["family"] = "Indo-European"
+ Locale["pt-PT"]["branch"] = "Western Romance"
+ Locale["pt-PT"]["iso"] = "por"
+ Locale["pt-PT"]["glotto"] = "port1283"
+ Locale["pt-PT"]["script"] = "Latn"
+ Locale["pt-PT"]["spoken-in"] = "Portugal; Brazil; Cape Verde; Angola; Mozambique; Guinea-Bissau; Equatorial Guinea; São Tomé and Príncipe; East Timor; Macau"
+ Locale["pt-PT"]["supported-by"] = "bing"
+
+ # Punjabi, Gurmukhī alphabet
Locale["pa"]["name"] = "Punjabi"
Locale["pa"]["endonym"] = "ਪੰਜਾਬੀ"
Locale["pa"]["translations-of"] = "ਦੇ ਅਨੁਵਾਦ%s"
@@ -1006,11 +1933,41 @@ function initLocale() {
Locale["pa"]["examples"] = "ਉਦਾਹਰਣਾਂ"
Locale["pa"]["see-also"] = "ਇਹ ਵੀ ਵੇਖੋ"
Locale["pa"]["family"] = "Indo-European"
+ Locale["pa"]["branch"] = "Indo-Aryan"
Locale["pa"]["iso"] = "pan"
Locale["pa"]["glotto"] = "panj1256"
Locale["pa"]["script"] = "Guru"
+ Locale["pa"]["spoken-in"] = "the Punjab region of India and Pakistan"
+ Locale["pa"]["supported-by"] = "google; bing; yandex"
+
+ # Quechua
+ Locale["qu"]["name"] = "Quechua"
+ Locale["qu"]["endonym"] = "Runasimi"
+ #Locale["qu"]["translations-of"]
+ #Locale["qu"]["definitions-of"]
+ #Locale["qu"]["synonyms"]
+ #Locale["qu"]["examples"]
+ #Locale["qu"]["see-also"]
+ Locale["qu"]["family"] = "Quechuan"
+ #Locale["qu"]["branch"]
+ Locale["qu"]["iso"] = "que"
+ Locale["qu"]["glotto"] = "quec1387"
+ Locale["qu"]["script"] = "Latn"
+ Locale["qu"]["spoken-in"] = "Peru; Bolivia; Ecuador; surrounding countries"
+ Locale["qu"]["supported-by"] = "google"
+
+ # Querétaro Otomi
+ Locale["otq"]["name"] = "Querétaro Otomi"
+ Locale["otq"]["endonym"] = "Hñąñho"
+ Locale["otq"]["family"] = "Oto-Manguean"
+ #Locale["otq"]["branch"]
+ Locale["otq"]["iso"] = "otq"
+ Locale["otq"]["glotto"] = "quer1236"
+ Locale["otq"]["script"] = "Latn"
+ Locale["otq"]["spoken-in"] = "Querétaro in Mexico"
+ Locale["otq"]["supported-by"] = "bing"
- #75 Romanian
+ # Romanian / Moldovan, Latin alphabet
Locale["ro"]["name"] = "Romanian"
Locale["ro"]["endonym"] = "Română"
Locale["ro"]["translations-of"] = "Traduceri pentru %s"
@@ -1019,11 +1976,30 @@ function initLocale() {
Locale["ro"]["examples"] = "Exemple"
Locale["ro"]["see-also"] = "Vedeți și"
Locale["ro"]["family"] = "Indo-European"
+ Locale["ro"]["branch"] = "Eastern Romance"
Locale["ro"]["iso"] = "ron"
Locale["ro"]["glotto"] = "roma1327"
Locale["ro"]["script"] = "Latn"
+ Locale["ro"]["spoken-in"] = "Romania; Moldova"
+ Locale["ro"]["supported-by"] = "google; bing; yandex"
+
+ # Romansh
+ Locale["rm"]["name"] = "Romansh"
+ Locale["rm"]["endonym"] = "Rumantsch"
+ #Locale["rm"]["translations-of"]
+ #Locale["rm"]["definitions-of"]
+ #Locale["rm"]["synonyms"]
+ #Locale["rm"]["examples"]
+ #Locale["rm"]["see-also"]
+ Locale["rm"]["family"] = "Indo-European"
+ Locale["rm"]["branch"] = "Western Romance"
+ Locale["rm"]["iso"] = "roh"
+ Locale["rm"]["glotto"] = "roma1326"
+ Locale["rm"]["script"] = "Latn"
+ Locale["rm"]["spoken-in"] = "the Swiss canton of the Grisons"
+ Locale["rm"]["supported-by"] = ""
- #76 Russian
+ # Russian
Locale["ru"]["name"] = "Russian"
Locale["ru"]["endonym"] = "Русский"
Locale["ru"]["translations-of"] = "%s: варианты перевода"
@@ -1032,12 +2008,15 @@ function initLocale() {
Locale["ru"]["examples"] = "Примеры"
Locale["ru"]["see-also"] = "Похожие слова"
Locale["ru"]["family"] = "Indo-European"
+ Locale["ru"]["branch"] = "East Slavic"
Locale["ru"]["iso"] = "rus"
Locale["ru"]["glotto"] = "russ1263"
Locale["ru"]["script"] = "Cyrl"
Locale["ru"]["dictionary"] = "true" # has dictionary
+ Locale["ru"]["spoken-in"] = "the Russian-speaking world"
+ Locale["ru"]["supported-by"] = "google; bing; yandex"
- #77 Samoan
+ # Samoan
Locale["sm"]["name"] = "Samoan"
Locale["sm"]["endonym"] = "Gagana Sāmoa"
#Locale["sm"]["translations-of"]
@@ -1046,11 +2025,30 @@ function initLocale() {
#Locale["sm"]["examples"]
#Locale["sm"]["see-also"]
Locale["sm"]["family"] = "Austronesian"
+ Locale["sm"]["branch"] = "Malayo-Polynesian"
Locale["sm"]["iso"] = "smo"
Locale["sm"]["glotto"] = "samo1305"
Locale["sm"]["script"] = "Latn"
-
- #78 Scots Gaelic
+ Locale["sm"]["spoken-in"] = "the Samoan Islands"
+ Locale["sm"]["supported-by"] = "google; bing"
+
+ # Sanskrit
+ Locale["sa"]["name"] = "Sanskrit"
+ Locale["sa"]["endonym"] = "संस्कृतम्"
+ #Locale["sa"]["translations-of"]
+ #Locale["sa"]["definitions-of"]
+ #Locale["sa"]["synonyms"]
+ #Locale["sa"]["examples"]
+ #Locale["sa"]["see-also"]
+ Locale["sa"]["family"] = "Indo-European"
+ Locale["sa"]["branch"] = "Indo-Aryan"
+ Locale["sa"]["iso"] = "san"
+ Locale["sa"]["glotto"] = "sans1269"
+ Locale["sa"]["script"] = "Deva"
+ Locale["sa"]["spoken-in"] = "ancient India"
+ Locale["sa"]["supported-by"] = "google"
+
+ # Scots Gaelic / Scottish Gaelic
Locale["gd"]["name"] = "Scots Gaelic"
Locale["gd"]["endonym"] = "Gàidhlig"
Locale["gd"]["translations-of"] = "Eadar-theangachadh airson %s"
@@ -1059,39 +2057,67 @@ function initLocale() {
Locale["gd"]["examples"] = "Buill-eisimpleir"
Locale["gd"]["see-also"] = "Faic na leanas cuideachd"
Locale["gd"]["family"] = "Indo-European"
+ Locale["gd"]["branch"] = "Celtic"
Locale["gd"]["iso"] = "gla"
Locale["gd"]["glotto"] = "scot1245"
Locale["gd"]["script"] = "Latn"
-
- #79a Serbian, Cyrillic alphabet
+ Locale["gd"]["spoken-in"] = "Scotland"
+ Locale["gd"]["supported-by"] = "google; yandex"
+
+ # Sepedi (Northern Sotho)
+ Locale["nso"]["name"] = "Sepedi"
+ Locale["nso"]["name2"] = "Pedi"
+ Locale["nso"]["name3"] = "Northern Sotho"
+ Locale["nso"]["endonym"] = "Sepedi"
+ #Locale["nso"]["translations-of"]
+ #Locale["nso"]["definitions-of"]
+ #Locale["nso"]["synonyms"]
+ #Locale["nso"]["examples"]
+ #Locale["nso"]["see-also"]
+ Locale["nso"]["family"] = "Atlantic-Congo"
+ Locale["nso"]["branch"] = "Bantu"
+ Locale["nso"]["iso"] = "nso"
+ Locale["nso"]["glotto"] = "nort3233"
+ Locale["nso"]["script"] = "Latn"
+ Locale["nso"]["spoken-in"] = "the northeastern provinces of South Africa"
+ Locale["nso"]["supported-by"] = "google"
+
+ # Serbian, Cyrillic alphabet
Locale["sr-Cyrl"]["name"] = "Serbian (Cyrillic)"
- Locale["sr-Cyrl"]["endonym"] = "српски"
+ Locale["sr-Cyrl"]["endonym"] = "Српски"
Locale["sr-Cyrl"]["translations-of"] = "Преводи за „%s“"
Locale["sr-Cyrl"]["definitions-of"] = "Дефиниције за %s"
Locale["sr-Cyrl"]["synonyms"] = "Синоними"
Locale["sr-Cyrl"]["examples"] = "Примери"
Locale["sr-Cyrl"]["see-also"] = "Погледајте такође"
Locale["sr-Cyrl"]["family"] = "Indo-European"
+ Locale["sr-Cyrl"]["branch"] = "South Slavic"
Locale["sr-Cyrl"]["iso"] = "srp-Cyrl"
Locale["sr-Cyrl"]["glotto"] = "serb1264"
Locale["sr-Cyrl"]["script"] = "Cyrl"
+ Locale["sr-Cyrl"]["spoken-in"] = "Serbia; Bosnia and Herzegovina; Montenegro; Kosovo"
+ Locale["sr-Cyrl"]["supported-by"] = "google; bing; yandex"
- #79b Serbian, Latin alphabet
- Locale["sr-Latn"]["support"] = "bing-only"
+ # Serbian, Latin alphabet
Locale["sr-Latn"]["name"] = "Serbian (Latin)"
- Locale["sr-Latn"]["endonym"] = "srpski"
+ Locale["sr-Latn"]["endonym"] = "Srpski"
Locale["sr-Latn"]["translations-of"] = "Prevodi za „%s“"
Locale["sr-Latn"]["definitions-of"] = "Definicije za %s"
Locale["sr-Latn"]["synonyms"] = "Sinonimi"
Locale["sr-Latn"]["examples"] = "Primeri"
Locale["sr-Latn"]["see-also"] = "Pogledajte takođe"
Locale["sr-Latn"]["family"] = "Indo-European"
+ Locale["sr-Latn"]["branch"] = "South Slavic"
Locale["sr-Latn"]["iso"] = "srp-Latn"
Locale["sr-Latn"]["glotto"] = "serb1264"
Locale["sr-Latn"]["script"] = "Latn"
+ Locale["sr-Latn"]["spoken-in"] = "Serbia; Bosnia and Herzegovina; Montenegro; Kosovo"
+ Locale["sr-Latn"]["supported-by"] = "bing"
- #80 Sesotho (Southern Sotho)
+ # Sesotho (Southern Sotho)
Locale["st"]["name"] = "Sesotho"
+ Locale["st"]["name2"] = "Sotho"
+ Locale["st"]["name3"] = "Southern Sotho"
Locale["st"]["endonym"] = "Sesotho"
Locale["st"]["translations-of"] = "Liphetolelo tsa %s"
Locale["st"]["definitions-of"] = "Meelelo ea %s"
@@ -1099,11 +2125,26 @@ function initLocale() {
Locale["st"]["examples"] = "Mehlala"
Locale["st"]["see-also"] = "Bona hape"
Locale["st"]["family"] = "Atlantic-Congo"
+ Locale["st"]["branch"] = "Bantu"
Locale["st"]["iso"] = "sot"
Locale["st"]["glotto"] = "sout2807"
Locale["st"]["script"] = "Latn"
-
- #81 Shona
+ Locale["st"]["spoken-in"] = "Lesotho; South Africa; Zimbabwe"
+ Locale["st"]["supported-by"] = "google"
+
+ # Setswana
+ Locale["tn"]["name"] = "Setswana"
+ Locale["tn"]["name2"] = "Tswana"
+ Locale["tn"]["endonym"] = "Setswana"
+ Locale["tn"]["family"] = "Atlantic-Congo"
+ Locale["tn"]["branch"] = "Bantu"
+ Locale["tn"]["iso"] = "tsn"
+ Locale["tn"]["glotto"] = "tswa1253"
+ Locale["tn"]["script"] = "Latn"
+ Locale["tn"]["spoken-in"] = "Botswana; South Africa"
+ Locale["tn"]["supported-by"] = ""
+
+ # Shona
Locale["sn"]["name"] = "Shona"
Locale["sn"]["endonym"] = "chiShona"
Locale["sn"]["translations-of"] = "Shanduro dze %s"
@@ -1112,11 +2153,14 @@ function initLocale() {
Locale["sn"]["examples"] = "Mienzaniso"
Locale["sn"]["see-also"] = "Onawo"
Locale["sn"]["family"] = "Atlantic-Congo"
+ Locale["sn"]["branch"] = "Bantu"
Locale["sn"]["iso"] = "sna"
Locale["sn"]["glotto"] = "core1255"
Locale["sn"]["script"] = "Latn"
+ Locale["sn"]["spoken-in"] = "Zimbabwe"
+ Locale["sn"]["supported-by"] = "google"
- #82 Sindhi
+ # Sindhi
Locale["sd"]["name"] = "Sindhi"
Locale["sd"]["endonym"] = "سنڌي"
Locale["sd"]["translations-of"] = "%s جو ترجمو"
@@ -1125,13 +2169,17 @@ function initLocale() {
Locale["sd"]["examples"] = "مثالون"
Locale["sd"]["see-also"] = "به ڏسو"
Locale["sd"]["family"] = "Indo-European"
+ Locale["sd"]["branch"] = "Indo-Aryan"
Locale["sd"]["iso"] = "snd"
Locale["sd"]["glotto"] = "sind1272"
Locale["sd"]["script"] = "Arab"
Locale["sd"]["rtl"] = "true" # RTL language
+ Locale["sd"]["spoken-in"] = "the region of Sindh in Pakistan; India"
+ Locale["sd"]["supported-by"] = "google"
- #83 Sinhala
+ # Sinhala / Sinhalese
Locale["si"]["name"] = "Sinhala"
+ Locale["si"]["name2"] = "Sinhalese"
Locale["si"]["endonym"] = "සිංහල"
Locale["si"]["translations-of"] = "%s හි පරිවර්තන"
Locale["si"]["definitions-of"] = "%s හි නිර්වචන"
@@ -1139,11 +2187,14 @@ function initLocale() {
Locale["si"]["examples"] = "උදාහරණ"
Locale["si"]["see-also"] = "මෙයත් බලන්න"
Locale["si"]["family"] = "Indo-European"
+ Locale["si"]["branch"] = "Indo-Aryan"
Locale["si"]["iso"] = "sin"
Locale["si"]["glotto"] = "sinh1246"
Locale["si"]["script"] = "Sinh"
+ Locale["si"]["spoken-in"] = "Sri Lanka"
+ Locale["si"]["supported-by"] = "google; yandex"
- #84 Slovak
+ # Slovak
Locale["sk"]["name"] = "Slovak"
Locale["sk"]["endonym"] = "Slovenčina"
Locale["sk"]["translations-of"] = "Preklady výrazu: %s"
@@ -1152,11 +2203,14 @@ function initLocale() {
Locale["sk"]["examples"] = "Príklady"
Locale["sk"]["see-also"] = "Pozrite tiež"
Locale["sk"]["family"] = "Indo-European"
+ Locale["sk"]["branch"] = "West Slavic"
Locale["sk"]["iso"] = "slk"
Locale["sk"]["glotto"] = "slov1269"
Locale["sk"]["script"] = "Latn"
+ Locale["sk"]["spoken-in"] = "Slovakia"
+ Locale["sk"]["supported-by"] = "google; bing; yandex"
- #85 Slovenian / Slovene
+ # Slovenian / Slovene
Locale["sl"]["name"] = "Slovenian"
Locale["sl"]["name2"] = "Slovene"
Locale["sl"]["endonym"] = "Slovenščina"
@@ -1166,11 +2220,14 @@ function initLocale() {
Locale["sl"]["examples"] = "Primeri"
Locale["sl"]["see-also"] = "Glejte tudi"
Locale["sl"]["family"] = "Indo-European"
+ Locale["sl"]["branch"] = "South Slavic"
Locale["sl"]["iso"] = "slv"
Locale["sl"]["glotto"] = "slov1268"
Locale["sl"]["script"] = "Latn"
+ Locale["sl"]["spoken-in"] = "Slovenia"
+ Locale["sl"]["supported-by"] = "google; bing; yandex"
- #86 Somali
+ # Somali
Locale["so"]["name"] = "Somali"
Locale["so"]["endonym"] = "Soomaali"
Locale["so"]["translations-of"] = "Turjumaada %s"
@@ -1179,11 +2236,14 @@ function initLocale() {
Locale["so"]["examples"] = "Tusaalooyin"
Locale["so"]["see-also"] = "Sidoo kale eeg"
Locale["so"]["family"] = "Afro-Asiatic"
+ Locale["so"]["branch"] = "Cushitic"
Locale["so"]["iso"] = "som"
Locale["so"]["glotto"] = "soma1255"
Locale["so"]["script"] = "Latn"
+ Locale["so"]["spoken-in"] = "Somalia; Somaliland; Ethiopia; Djibouti"
+ Locale["so"]["supported-by"] = "google; bing"
- #87 Spanish
+ # Spanish
Locale["es"]["name"] = "Spanish"
Locale["es"]["endonym"] = "Español"
Locale["es"]["translations-of"] = "Traducciones de %s"
@@ -1192,12 +2252,15 @@ function initLocale() {
Locale["es"]["examples"] = "Ejemplos"
Locale["es"]["see-also"] = "Ver también"
Locale["es"]["family"] = "Indo-European"
+ Locale["es"]["branch"] = "Western Romance"
Locale["es"]["iso"] = "spa"
Locale["es"]["glotto"] = "stan1288"
Locale["es"]["script"] = "Latn"
Locale["es"]["dictionary"] = "true" # has dictionary
+ Locale["es"]["spoken-in"] = "Spain; the Americas"
+ Locale["es"]["supported-by"] = "google; bing; yandex"
- #88 Sundanese, Latin alphabet
+ # Sundanese, Latin alphabet
Locale["su"]["name"] = "Sundanese"
Locale["su"]["endonym"] = "Basa Sunda"
Locale["su"]["translations-of"] = "Tarjamahan tina %s"
@@ -1206,11 +2269,14 @@ function initLocale() {
Locale["su"]["examples"] = "Conto"
Locale["su"]["see-also"] = "Tingali ogé"
Locale["su"]["family"] = "Austronesian"
+ Locale["su"]["branch"] = "Malayo-Polynesian"
Locale["su"]["iso"] = "sun"
Locale["su"]["glotto"] = "sund1252"
Locale["su"]["script"] = "Latn"
+ Locale["su"]["spoken-in"] = "Java, Indonesia"
+ Locale["su"]["supported-by"] = "google; yandex"
- #89 Swahili / Kiswahili
+ # Swahili / Kiswahili, Latin script
Locale["sw"]["name"] = "Swahili"
Locale["sw"]["name2"] = "Kiswahili"
Locale["sw"]["endonym"] = "Kiswahili"
@@ -1220,11 +2286,14 @@ function initLocale() {
Locale["sw"]["examples"] = "Mifano"
Locale["sw"]["see-also"] = "Angalia pia"
Locale["sw"]["family"] = "Atlantic-Congo"
+ Locale["sw"]["branch"] = "Bantu"
Locale["sw"]["iso"] = "swa"
Locale["sw"]["glotto"] = "swah1253"
Locale["sw"]["script"] = "Latn"
+ Locale["sw"]["spoken-in"] = "the East African coast and litoral islands"
+ Locale["sw"]["supported-by"] = "google; bing; yandex"
- #90 Swedish
+ # Swedish
Locale["sv"]["name"] = "Swedish"
Locale["sv"]["endonym"] = "Svenska"
Locale["sv"]["translations-of"] = "Översättningar av %s"
@@ -1233,11 +2302,25 @@ function initLocale() {
Locale["sv"]["examples"] = "Exempel"
Locale["sv"]["see-also"] = "Se även"
Locale["sv"]["family"] = "Indo-European"
+ Locale["sv"]["branch"] = "North Germanic"
Locale["sv"]["iso"] = "swe"
Locale["sv"]["glotto"] = "swed1254"
Locale["sv"]["script"] = "Latn"
-
- #91 Tajik / Tajiki (Tajiki Persian), Cyrillic alphabet
+ Locale["sv"]["spoken-in"] = "Sweden; Finland; Estonia"
+ Locale["sv"]["supported-by"] = "google; bing; yandex"
+
+ # Tahitian
+ Locale["ty"]["name"] = "Tahitian"
+ Locale["ty"]["endonym"] = "Reo Tahiti"
+ Locale["ty"]["family"] = "Austronesian"
+ Locale["ty"]["branch"] = "Malayo-Polynesian"
+ Locale["ty"]["iso"] = "tah"
+ Locale["ty"]["glotto"] = "tahi1242"
+ Locale["ty"]["script"] = "Latn"
+ Locale["ty"]["spoken-in"] = "French Polynesia"
+ Locale["ty"]["supported-by"] = "bing"
+
+ # Tajik / Tajiki (Tajiki Persian), Cyrillic alphabet
Locale["tg"]["name"] = "Tajik"
Locale["tg"]["name2"] = "Tajiki"
Locale["tg"]["endonym"] = "Тоҷикӣ"
@@ -1247,11 +2330,14 @@ function initLocale() {
Locale["tg"]["examples"] = "Намунаҳо:"
Locale["tg"]["see-also"] = "Ҳамчунин Бинед"
Locale["tg"]["family"] = "Indo-European"
+ Locale["tg"]["branch"] = "Iranian"
Locale["tg"]["iso"] = "tgk"
Locale["tg"]["glotto"] = "taji1245"
Locale["tg"]["script"] = "Cyrl"
+ Locale["tg"]["spoken-in"] = "Tajikistan; Uzbekistan"
+ Locale["tg"]["supported-by"] = "google; yandex"
- #92 Tamil
+ # Tamil
Locale["ta"]["name"] = "Tamil"
Locale["ta"]["endonym"] = "தமிழ்"
Locale["ta"]["translations-of"] = "%s இன் மொழிபெயர்ப்புகள்"
@@ -1260,11 +2346,14 @@ function initLocale() {
Locale["ta"]["examples"] = "எடுத்துக்காட்டுகள்"
Locale["ta"]["see-also"] = "இதையும் காண்க"
Locale["ta"]["family"] = "Dravidian"
+ Locale["ta"]["branch"] = "South Dravidian"
Locale["ta"]["iso"] = "tam"
Locale["ta"]["glotto"] = "tami1289"
Locale["ta"]["script"] = "Taml"
+ Locale["ta"]["spoken-in"] = "the Indian state of Tamil Nadu; Sri Lanka; Singapore"
+ Locale["ta"]["supported-by"] = "google; bing; yandex"
- #93 Tatar
+ # Tatar, Cyrillic alphabet
Locale["tt"]["name"] = "Tatar"
Locale["tt"]["endonym"] = "татарча"
#Locale["tt"]["translations-of"]
@@ -1273,11 +2362,14 @@ function initLocale() {
#Locale["tt"]["examples"]
#Locale["tt"]["see-also"]
Locale["tt"]["family"] = "Turkic"
+ Locale["tt"]["branch"] = "Kipchak"
Locale["tt"]["iso"] = "tat"
Locale["tt"]["glotto"] = "tata1255"
Locale["tt"]["script"] = "Cyrl"
+ Locale["tt"]["spoken-in"] = "the Republic of Tatarstan in Russia"
+ Locale["tt"]["supported-by"] = "google; bing; yandex"
- #94 Telugu
+ # Telugu
Locale["te"]["name"] = "Telugu"
Locale["te"]["endonym"] = "తెలుగు"
Locale["te"]["translations-of"] = "%s యొక్క అనువాదాలు"
@@ -1286,11 +2378,14 @@ function initLocale() {
Locale["te"]["examples"] = "ఉదాహరణలు"
Locale["te"]["see-also"] = "వీటిని కూడా చూడండి"
Locale["te"]["family"] = "Dravidian"
+ Locale["te"]["branch"] = "South-Central Dravidian"
Locale["te"]["iso"] = "tel"
Locale["te"]["glotto"] = "telu1262"
Locale["te"]["script"] = "Telu"
+ Locale["te"]["spoken-in"] = "the Indian states of Andhra Pradesh and Telangana"
+ Locale["te"]["supported-by"] = "google; bing; yandex"
- #95 Thai
+ # Thai
Locale["th"]["name"] = "Thai"
Locale["th"]["endonym"] = "ไทย"
Locale["th"]["translations-of"] = "คำแปลของ %s"
@@ -1298,12 +2393,74 @@ function initLocale() {
Locale["th"]["synonyms"] = "คำพ้องความหมาย"
Locale["th"]["examples"] = "ตัวอย่าง"
Locale["th"]["see-also"] = "ดูเพิ่มเติม"
- Locale["th"]["family"] = "Tai-Kadai"
+ Locale["th"]["family"] = "Kra-Dai"
+ Locale["th"]["branch"] = "Tai"
Locale["th"]["iso"] = "tha"
Locale["th"]["glotto"] = "thai1261"
Locale["th"]["script"] = "Thai"
+ Locale["th"]["spoken-in"] = "Thailand"
+ Locale["th"]["supported-by"] = "google; bing; yandex"
+
+ # Tibetan (Standard Tibetan)
+ Locale["bo"]["name"] = "Tibetan"
+ Locale["bo"]["endonym"] = "བོད་ཡིག"
+ #Locale["bo"]["translations-of"]
+ #Locale["bo"]["definitions-of"]
+ #Locale["bo"]["synonyms"]
+ #Locale["bo"]["examples"]
+ #Locale["bo"]["see-also"]
+ Locale["bo"]["family"] = "Sino-Tibetan"
+ Locale["bo"]["branch"] = "Tibetic"
+ Locale["bo"]["iso"] = "bod"
+ Locale["bo"]["glotto"] = "tibe1272"
+ Locale["bo"]["script"] = "Tibt"
+ Locale["bo"]["spoken-in"] = "the Tibet Autonomous Region of China"
+ Locale["bo"]["supported-by"] = "bing"
- #96 Turkish
+ # Tigrinya
+ Locale["ti"]["name"] = "Tigrinya"
+ Locale["ti"]["endonym"] = "ትግርኛ"
+ #Locale["ti"]["translations-of"]
+ #Locale["ti"]["definitions-of"]
+ #Locale["ti"]["synonyms"]
+ #Locale["ti"]["examples"]
+ #Locale["ti"]["see-also"]
+ Locale["ti"]["family"] = "Afro-Asiatic"
+ Locale["ti"]["branch"] = "Semitic"
+ Locale["ti"]["iso"] = "tir"
+ Locale["ti"]["glotto"] = "tigr1271"
+ Locale["ti"]["script"] = "Ethi"
+ Locale["ti"]["spoken-in"] = "Eritrea; the Tigray region of northern Ethiopia"
+ Locale["ti"]["supported-by"] = "google; bing"
+
+ # Tongan
+ Locale["to"]["name"] = "Tongan"
+ Locale["to"]["endonym"] = "Lea faka-Tonga"
+ Locale["to"]["family"] = "Austronesian"
+ Locale["to"]["branch"] = "Malayo-Polynesian"
+ Locale["to"]["iso"] = "ton"
+ Locale["to"]["glotto"] = "tong1325"
+ Locale["to"]["script"] = "Latn"
+ Locale["to"]["spoken-in"] = "Tonga"
+ Locale["to"]["supported-by"] = "bing"
+
+ # Tsonga
+ Locale["ts"]["name"] = "Tsonga"
+ Locale["ts"]["endonym"] = "Xitsonga"
+ #Locale["ts"]["translations-of"]
+ #Locale["ts"]["definitions-of"]
+ #Locale["ts"]["synonyms"]
+ #Locale["ts"]["examples"]
+ #Locale["ts"]["see-also"]
+ Locale["ts"]["family"] = "Atlantic-Congo"
+ Locale["ts"]["branch"] = "Bantu"
+ Locale["ts"]["iso"] = "tso"
+ Locale["ts"]["glotto"] = "tson1249"
+ Locale["ts"]["script"] = "Latn"
+ Locale["ts"]["spoken-in"] = "Eswatini; Mozambique; South Africa; Zimbabwe"
+ Locale["ts"]["supported-by"] = "google"
+
+ # Turkish
Locale["tr"]["name"] = "Turkish"
Locale["tr"]["endonym"] = "Türkçe"
Locale["tr"]["translations-of"] = "%s çevirileri"
@@ -1312,11 +2469,14 @@ function initLocale() {
Locale["tr"]["examples"] = "Örnekler"
Locale["tr"]["see-also"] = "Ayrıca bkz."
Locale["tr"]["family"] = "Turkic"
+ Locale["tr"]["branch"] = "Oghuz"
Locale["tr"]["iso"] = "tur"
Locale["tr"]["glotto"] = "nucl1301"
Locale["tr"]["script"] = "Latn"
+ Locale["tr"]["spoken-in"] = "Türkiye; Cyprus"
+ Locale["tr"]["supported-by"] = "google; bing; yandex"
- #97 Turkmen
+ # Turkmen, Latin script
Locale["tk"]["name"] = "Turkmen"
Locale["tk"]["endonym"] = "Türkmen"
#Locale["tk"]["translations-of"]
@@ -1325,11 +2485,42 @@ function initLocale() {
#Locale["tk"]["examples"]
#Locale["tk"]["see-also"]
Locale["tk"]["family"] = "Turkic"
+ Locale["tk"]["branch"] = "Oghuz"
Locale["tk"]["iso"] = "tuk"
Locale["tk"]["glotto"] = "turk1304"
Locale["tk"]["script"] = "Latn"
+ Locale["tk"]["spoken-in"] = "Turkmenistan; Iran; Afghanistan; Pakistan"
+ Locale["tk"]["supported-by"] = "google; bing"
+
+ # Twi
+ Locale["tw"]["name"] = "Twi"
+ Locale["tw"]["name2"] = "Akan Kasa"
+ Locale["tw"]["endonym"] = "Twi"
+ #Locale["tw"]["translations-of"]
+ #Locale["tw"]["definitions-of"]
+ #Locale["tw"]["synonyms"]
+ #Locale["tw"]["examples"]
+ #Locale["tw"]["see-also"]
+ Locale["tw"]["family"] = "Atlantic-Congo"
+ Locale["tw"]["branch"] = "Kwa"
+ Locale["tw"]["iso"] = "twi"
+ Locale["tw"]["glotto"] = "akua1239"
+ Locale["tw"]["script"] = "Latn"
+ Locale["tw"]["spoken-in"] = "Ghana"
+ Locale["tw"]["supported-by"] = "google"
+
+ # Udmurt
+ Locale["udm"]["name"] = "Udmurt"
+ Locale["udm"]["endonym"] = "Удмурт"
+ Locale["udm"]["family"] = "Uralic"
+ Locale["udm"]["branch"] = "Permic"
+ Locale["udm"]["iso"] = "udm"
+ Locale["udm"]["glotto"] = "udmu1245"
+ Locale["udm"]["script"] = "Cyrl"
+ Locale["udm"]["spoken-in"] = "the Republic of Udmurt in Russia"
+ Locale["udm"]["supported-by"] = "yandex"
- #98 Ukrainian
+ # Ukrainian
Locale["uk"]["name"] = "Ukrainian"
Locale["uk"]["endonym"] = "Українська"
Locale["uk"]["translations-of"] = "Переклади слова або виразу \"%s\""
@@ -1338,11 +2529,25 @@ function initLocale() {
Locale["uk"]["examples"] = "Приклади"
Locale["uk"]["see-also"] = "Дивіться також"
Locale["uk"]["family"] = "Indo-European"
+ Locale["uk"]["branch"] = "East Slavic"
Locale["uk"]["iso"] = "ukr"
Locale["uk"]["glotto"] = "ukra1253"
Locale["uk"]["script"] = "Cyrl"
-
- #99 Urdu
+ Locale["uk"]["spoken-in"] = "Ukraine"
+ Locale["uk"]["supported-by"] = "google; bing; yandex"
+
+ # Upper Sorbian
+ Locale["hsb"]["name"] = "Upper Sorbian"
+ Locale["hsb"]["endonym"] = "Hornjoserbšćina"
+ Locale["hsb"]["family"] = "Indo-European"
+ Locale["hsb"]["branch"] = "West Slavic"
+ Locale["hsb"]["iso"] = "hsb"
+ Locale["hsb"]["glotto"] = "uppe1395"
+ Locale["hsb"]["script"] = "Latn"
+ Locale["hsb"]["spoken-in"] = "Saxony, Germany"
+ Locale["hsb"]["supported-by"] = "bing"
+
+ # Urdu
Locale["ur"]["name"] = "Urdu"
Locale["ur"]["endonym"] = "اُردُو"
Locale["ur"]["translations-of"] = "کے ترجمے %s"
@@ -1351,12 +2556,15 @@ function initLocale() {
Locale["ur"]["examples"] = "مثالیں"
Locale["ur"]["see-also"] = "نیز دیکھیں"
Locale["ur"]["family"] = "Indo-European"
+ Locale["ur"]["branch"] = "Indo-Aryan"
Locale["ur"]["iso"] = "urd"
Locale["ur"]["glotto"] = "urdu1245"
Locale["ur"]["script"] = "Arab"
Locale["ur"]["rtl"] = "true" # RTL language
+ Locale["ur"]["spoken-in"] = "Pakistan; India"
+ Locale["ur"]["supported-by"] = "google; bing; yandex"
- #100 Uyghur
+ # Uyghur
Locale["ug"]["name"] = "Uyghur"
Locale["ug"]["endonym"] = "ئۇيغۇر تىلى"
#Locale["ug"]["translations-of"]
@@ -1365,12 +2573,15 @@ function initLocale() {
#Locale["ug"]["examples"]
#Locale["ug"]["see-also"]
Locale["ug"]["family"] = "Turkic"
+ Locale["ug"]["branch"] = "Karluk"
Locale["ug"]["iso"] = "uig"
Locale["ug"]["glotto"] = "uigh1240"
Locale["ug"]["script"] = "Arab"
Locale["ug"]["rtl"] = "true" # RTL language
+ Locale["ug"]["spoken-in"] = "the Xinjiang Uyghur Autonomous Region of China"
+ Locale["ug"]["supported-by"] = "google; bing"
- #101 Uzbek, Latin alphabet
+ # Uzbek, Latin alphabet
Locale["uz"]["name"] = "Uzbek"
Locale["uz"]["endonym"] = "Oʻzbek tili"
Locale["uz"]["translations-of"] = "%s: tarjima variantlari"
@@ -1379,11 +2590,14 @@ function initLocale() {
Locale["uz"]["examples"] = "Namunalar"
Locale["uz"]["see-also"] = "O‘xshash so‘zlar"
Locale["uz"]["family"] = "Turkic"
+ Locale["uz"]["branch"] = "Karluk"
Locale["uz"]["iso"] = "uzb"
Locale["uz"]["glotto"] = "uzbe1247"
Locale["uz"]["script"] = "Latn"
+ Locale["uz"]["spoken-in"] = "Uzbekistan; Afghanistan; Pakistan"
+ Locale["uz"]["supported-by"] = "google; bing; yandex"
- #102 Vietnamese
+ # Vietnamese
Locale["vi"]["name"] = "Vietnamese"
Locale["vi"]["endonym"] = "Tiếng Việt"
Locale["vi"]["translations-of"] = "Bản dịch của %s"
@@ -1392,11 +2606,31 @@ function initLocale() {
Locale["vi"]["examples"] = "Ví dụ"
Locale["vi"]["see-also"] = "Xem thêm"
Locale["vi"]["family"] = "Austroasiatic"
+ Locale["vi"]["branch"] = "Vietic"
Locale["vi"]["iso"] = "vie"
Locale["vi"]["glotto"] = "viet1252"
Locale["vi"]["script"] = "Latn"
+ Locale["vi"]["spoken-in"] = "Vietnam"
+ Locale["vi"]["supported-by"] = "google; bing; yandex"
+
+ # Volapük
+ Locale["vo"]["name"] = "Volapük"
+ Locale["vo"]["endonym"] = "Volapük"
+ #Locale["vo"]["translations-of"]
+ #Locale["vo"]["definitions-of"]
+ #Locale["vo"]["synonyms"]
+ #Locale["vo"]["examples"]
+ #Locale["vo"]["see-also"]
+ Locale["vo"]["family"] = "Constructed language"
+ #Locale["vo"]["branch"]
+ Locale["vo"]["iso"] = "vol"
+ Locale["vo"]["glotto"] = "vola1234"
+ Locale["vo"]["script"] = "Latn"
+ Locale["vo"]["spoken-in"] = "worldwide"
+ Locale["vo"]["description"] = "an international auxiliary language"
+ Locale["vo"]["supported-by"] = ""
- #103 Welsh
+ # Welsh
Locale["cy"]["name"] = "Welsh"
Locale["cy"]["endonym"] = "Cymraeg"
Locale["cy"]["translations-of"] = "Cyfieithiadau %s"
@@ -1405,11 +2639,14 @@ function initLocale() {
Locale["cy"]["examples"] = "Enghreifftiau"
Locale["cy"]["see-also"] = "Gweler hefyd"
Locale["cy"]["family"] = "Indo-European"
+ Locale["cy"]["branch"] = "Celtic"
Locale["cy"]["iso"] = "cym"
Locale["cy"]["glotto"] = "wels1247"
Locale["cy"]["script"] = "Latn"
+ Locale["cy"]["spoken-in"] = "Wales in the UK"
+ Locale["cy"]["supported-by"] = "google; bing; yandex"
- #104 West Frisian
+ # West Frisian
Locale["fy"]["name"] = "Frisian"
Locale["fy"]["endonym"] = "Frysk"
Locale["fy"]["translations-of"] = "Oersettings fan %s"
@@ -1418,24 +2655,58 @@ function initLocale() {
Locale["fy"]["examples"] = "Foarbylden"
Locale["fy"]["see-also"] = "Sjoch ek"
Locale["fy"]["family"] = "Indo-European"
+ Locale["fy"]["branch"] = "West Germanic"
Locale["fy"]["iso"] = "fry"
Locale["fy"]["glotto"] = "west2354"
Locale["fy"]["script"] = "Latn"
+ Locale["fy"]["spoken-in"] = "Friesland in the Netherlands"
+ Locale["fy"]["supported-by"] = "google"
- #105 Xhosa
- Locale["xh"]["name"] = "Xhosa"
- Locale["xh"]["endonym"] = "isiXhosa"
- Locale["xh"]["translations-of"] = "Iinguqulelo zika-%s"
- Locale["xh"]["definitions-of"] = "Iingcaciso zika-%s"
- Locale["xh"]["synonyms"] = "Izithethantonye"
- Locale["xh"]["examples"] = "Imizekelo"
- Locale["xh"]["see-also"] = "Kwakhona bona"
+ # Wolof
+ Locale["wo"]["name"] = "Wolof"
+ Locale["wo"]["endonym"] = "Wollof"
+ #Locale["wo"]["translations-of"]
+ #Locale["wo"]["definitions-of"]
+ #Locale["wo"]["synonyms"]
+ #Locale["wo"]["examples"]
+ #Locale["wo"]["see-also"]
+ Locale["wo"]["family"] = "Atlantic-Congo"
+ Locale["wo"]["branch"] = "Atlantic"
+ Locale["wo"]["iso"] = "wol"
+ Locale["wo"]["glotto"] = "wolo1247"
+ Locale["wo"]["script"] = "Latn"
+ Locale["wo"]["spoken-in"] = "Senegal; Mauritania; the Gambia"
+ Locale["wo"]["supported-by"] = ""
+
+ # Xhosa
+ Locale["xh"]["name"] = "Xhosa"
+ Locale["xh"]["endonym"] = "isiXhosa"
+ Locale["xh"]["translations-of"] = "Iinguqulelo zika-%s"
+ Locale["xh"]["definitions-of"] = "Iingcaciso zika-%s"
+ Locale["xh"]["synonyms"] = "Izithethantonye"
+ Locale["xh"]["examples"] = "Imizekelo"
+ Locale["xh"]["see-also"] = "Kwakhona bona"
Locale["xh"]["family"] = "Atlantic-Congo"
+ Locale["xh"]["branch"] = "Bantu"
Locale["xh"]["iso"] = "xho"
Locale["xh"]["glotto"] = "xhos1239"
Locale["xh"]["script"] = "Latn"
-
- #106 Yiddish
+ Locale["xh"]["spoken-in"] = "South Africa; Zimbabwe"
+ Locale["xh"]["supported-by"] = "google; yandex"
+
+ # Yakut / Sakha
+ Locale["sah"]["name"] = "Yakut"
+ Locale["sah"]["name2"] = "Sakha"
+ Locale["sah"]["endonym"] = "Sakha"
+ Locale["sah"]["family"] = "Turkic"
+ Locale["sah"]["branch"] = "Siberian Turkic"
+ Locale["sah"]["iso"] = "sah"
+ Locale["sah"]["glotto"] = "yaku1245"
+ Locale["sah"]["script"] = "Latn"
+ Locale["sah"]["spoken-in"] = "the Republic of Sakha (Yakutia) in Russia"
+ Locale["sah"]["supported-by"] = "yandex"
+
+ # Yiddish
Locale["yi"]["name"] = "Yiddish"
Locale["yi"]["endonym"] = "ייִדיש"
Locale["yi"]["translations-of"] = "איבערזעצונגען פון %s"
@@ -1444,12 +2715,16 @@ function initLocale() {
Locale["yi"]["examples"] = "ביישפילע"
Locale["yi"]["see-also"] = "זייען אויך"
Locale["yi"]["family"] = "Indo-European"
+ Locale["yi"]["branch"] = "West Germanic"
Locale["yi"]["iso"] = "yid"
Locale["yi"]["glotto"] = "yidd1255"
Locale["yi"]["script"] = "Hebr"
Locale["yi"]["rtl"] = "true" # RTL language
+ Locale["yi"]["spoken-in"] = "worldwide"
+ Locale["yi"]["description"] = "a West Germanic language historically spoken by Ashkenazi Jews"
+ Locale["yi"]["supported-by"] = "google; yandex"
- #107 Yoruba
+ # Yoruba
Locale["yo"]["name"] = "Yoruba"
Locale["yo"]["endonym"] = "Yorùbá"
Locale["yo"]["translations-of"] = "Awọn itumọ ti %s"
@@ -1458,11 +2733,25 @@ function initLocale() {
Locale["yo"]["examples"] = "Awọn apẹrẹ"
Locale["yo"]["see-also"] = "Tun wo"
Locale["yo"]["family"] = "Atlantic-Congo"
+ #Locale["yo"]["branch"]
Locale["yo"]["iso"] = "yor"
Locale["yo"]["glotto"] = "yoru1245"
Locale["yo"]["script"] = "Latn"
+ Locale["yo"]["spoken-in"] = "Nigeria; Benin"
+ Locale["yo"]["supported-by"] = "google"
- #108 Zulu
+ # Yucatec Maya
+ Locale["yua"]["name"] = "Yucatec Maya"
+ Locale["yua"]["endonym"] = "Màaya T'àan"
+ Locale["yua"]["family"] = "Mayan"
+ #Locale["yua"]["branch"]
+ Locale["yua"]["iso"] = "yua"
+ Locale["yua"]["glotto"] = "yuca1254"
+ Locale["yua"]["script"] = "Latn"
+ Locale["yua"]["spoken-in"] = "Mexico; Belize"
+ Locale["yua"]["supported-by"] = "bing"
+
+ # Zulu
Locale["zu"]["name"] = "Zulu"
Locale["zu"]["endonym"] = "isiZulu"
Locale["zu"]["translations-of"] = "Ukuhumusha i-%s"
@@ -1471,409 +2760,30 @@ function initLocale() {
Locale["zu"]["examples"] = "Izibonelo"
Locale["zu"]["see-also"] = "Bheka futhi"
Locale["zu"]["family"] = "Atlantic-Congo"
+ Locale["zu"]["branch"] = "Bantu"
Locale["zu"]["iso"] = "zul"
Locale["zu"]["glotto"] = "zulu1248"
Locale["zu"]["script"] = "Latn"
+ Locale["zu"]["spoken-in"] = "South Africa; Lesotho; Eswatini"
+ Locale["zu"]["supported-by"] = "google; bing; yandex"
- #* Cantonese
- Locale["yue"]["support"] = "bing-only"
- Locale["yue"]["name"] = "Cantonese"
- Locale["yue"]["endonym"] = "粵語"
- Locale["yue"]["family"] = "Sino-Tibetan"
- Locale["yue"]["iso"] = "yue"
- Locale["yue"]["glotto"] = "cant1236"
- Locale["yue"]["script"] = "Hant"
-
- #* Dari (Dari Persian)
- Locale["prs"]["support"] = "bing-only"
- Locale["prs"]["name"] = "Dari"
- Locale["prs"]["endonym"] = "دری"
- Locale["prs"]["family"] = "Indo-European"
- Locale["prs"]["iso"] = "prs"
- Locale["prs"]["glotto"] = "dari1249"
- Locale["prs"]["script"] = "Arab"
- Locale["prs"]["rtl"] = "true" # RTL language
-
- #* Fijian
- Locale["fj"]["support"] = "bing-only"
- Locale["fj"]["name"] = "Fijian"
- Locale["fj"]["endonym"] = "Vosa Vakaviti"
- Locale["fj"]["family"] = "Austronesian"
- Locale["fj"]["iso"] = "fij"
- Locale["fj"]["glotto"] = "fiji1243"
- Locale["fj"]["script"] = "Latn"
-
- #* Hmong Daw (White Hmong)
- Locale["mww"]["support"] = "bing-only"
- Locale["mww"]["name"] = "Hmong Daw"
- Locale["mww"]["endonym"] = "Hmoob Daw"
- Locale["mww"]["family"] = "Hmong-Mien"
- Locale["mww"]["iso"] = "mww"
- Locale["mww"]["glotto"] = "hmon1333"
- Locale["mww"]["script"] = "Latn"
-
- #* Portuguese (European)
- Locale["pt-PT"]["support"] = "bing-only"
- Locale["pt-PT"]["name"] = "Portuguese (European)"
- Locale["pt-PT"]["endonym"] = "Português Europeu"
- Locale["pt-PT"]["translations-of"] = "Traduções de %s"
- Locale["pt-PT"]["definitions-of"] = "Definições de %s"
- Locale["pt-PT"]["synonyms"] = "Sinônimos"
- Locale["pt-PT"]["examples"] = "Exemplos"
- Locale["pt-PT"]["see-also"] = "Veja também"
- Locale["pt-PT"]["family"] = "Indo-European"
- Locale["pt-PT"]["iso"] = "por"
- Locale["pt-PT"]["glotto"] = "port1283"
- Locale["pt-PT"]["script"] = "Latn"
-
- #* Querétaro Otomi
- Locale["otq"]["support"] = "bing-only"
- Locale["otq"]["name"] = "Querétaro Otomi"
- Locale["otq"]["endonym"] = "Hñąñho"
- Locale["otq"]["family"] = "Oto-Manguean"
- Locale["otq"]["iso"] = "otq"
- Locale["otq"]["glotto"] = "quer1236"
- Locale["otq"]["script"] = "Latn"
-
- #* Tahitian
- Locale["ty"]["support"] = "bing-only"
- Locale["ty"]["name"] = "Tahitian"
- Locale["ty"]["endonym"] = "Reo Tahiti"
- Locale["ty"]["family"] = "Austronesian"
- Locale["ty"]["iso"] = "tah"
- Locale["ty"]["glotto"] = "tahi1242"
- Locale["ty"]["script"] = "Latn"
-
- #* Tongan
- Locale["to"]["support"] = "bing-only"
- Locale["to"]["name"] = "Tongan"
- Locale["to"]["endonym"] = "Lea faka-Tonga"
- Locale["to"]["family"] = "Austronesian"
- Locale["to"]["iso"] = "ton"
- Locale["to"]["glotto"] = "tong1325"
- Locale["to"]["script"] = "Latn"
-
- #* Yucatec Maya
- Locale["yua"]["support"] = "bing-only"
- Locale["yua"]["name"] = "Yucatec Maya"
- Locale["yua"]["endonym"] = "Màaya T'àan"
- Locale["yua"]["family"] = "Mayan"
- Locale["yua"]["iso"] = "yua"
- Locale["yua"]["glotto"] = "yuca1254"
- Locale["yua"]["script"] = "Latn"
-
- #* Klingon, Latin alphabet
- Locale["tlh"]["support"] = "bing-only"
- Locale["tlh"]["name"] = "Klingon"
- Locale["tlh"]["endonym"] = "tlhIngan Hol"
- Locale["tlh"]["family"] = "Artificial Language"
- Locale["tlh"]["iso"] = "tlh"
- #Locale["tlh"]["glotto"]
- Locale["tlh"]["script"] = "Latn"
-
- #* Klingon, pIqaD
- Locale["tlh-Qaak"]["support"] = "bing-only"
- Locale["tlh-Qaak"]["name"] = "Klingon (pIqaD)"
- Locale["tlh-Qaak"]["endonym"] = " "
- Locale["tlh-Qaak"]["family"] = "Artificial Language"
- Locale["tlh-Qaak"]["iso"] = "tlh"
- #Locale["tlh-Qaak"]["glotto"]
- Locale["tlh-Qaak"]["script"] = "Piqd"
-
- #* Kurdish (Northern Kurdish / Kurmanji), Latin alphabet
- Locale["kmr"]["support"] = "bing-only"
- Locale["kmr"]["name"] = "Kurdish (Northern)"
- Locale["kmr"]["name2"] = "Kurmanji"
- Locale["kmr"]["endonym"] = "Kurmancî"
- Locale["kmr"]["family"] = "Indo-European"
- Locale["kmr"]["iso"] = "kmr"
- Locale["kmr"]["glotto"] = "nort2641"
- Locale["kmr"]["script"] = "Latn"
-
- #? Assamese
- Locale["as"]["support"] = "unstable"
- Locale["as"]["name"] = "Assamese"
- Locale["as"]["endonym"] = "অসমীয়া"
- #Locale["as"]["translations-of"]
- #Locale["as"]["definitions-of"]
- #Locale["as"]["synonyms"]
- #Locale["as"]["examples"]
- #Locale["as"]["see-also"]
- Locale["as"]["family"] = "Indo-European"
- Locale["as"]["iso"] = "asm"
- Locale["as"]["glotto"] = "assa1263"
- Locale["as"]["script"] = "Beng"
-
- #? Bashkir
- Locale["ba"]["support"] = "yandex-only"
- Locale["ba"]["name"] = "Bashkir"
- Locale["ba"]["endonym"] = "башҡорт теле"
- #Locale["ba"]["translations-of"]
- #Locale["ba"]["definitions-of"]
- #Locale["ba"]["synonyms"]
- #Locale["ba"]["examples"]
- #Locale["ba"]["see-also"]
- Locale["ba"]["family"] = "Turkic"
- Locale["ba"]["iso"] = "bak"
- Locale["ba"]["glotto"] = "bash1264"
- Locale["ba"]["script"] = "Cyrl"
-
- #? Breton
- Locale["br"]["support"] = "unstable"
- Locale["br"]["name"] = "Breton"
- Locale["br"]["endonym"] = "Brezhoneg"
- #Locale["br"]["translations-of"]
- #Locale["br"]["definitions-of"]
- #Locale["br"]["synonyms"]
- #Locale["br"]["examples"]
- #Locale["br"]["see-also"]
- Locale["br"]["family"] = "Indo-European"
- Locale["br"]["iso"] = "bre"
- Locale["br"]["glotto"] = "bret1244"
- Locale["br"]["script"] = "Latn"
-
- #? Dzongkha
- Locale["dz"]["support"] = "unstable"
- Locale["dz"]["name"] = "Dzongkha"
- Locale["dz"]["endonym"] = "རྫོང་ཁ"
- #Locale["dz"]["translations-of"]
- #Locale["dz"]["definitions-of"]
- #Locale["dz"]["synonyms"]
- #Locale["dz"]["examples"]
- #Locale["dz"]["see-also"]
- Locale["dz"]["family"] = "Sino-Tibetan"
- Locale["dz"]["iso"] = "dzo"
- Locale["dz"]["glotto"] = "nucl1307"
- Locale["dz"]["script"] = "Tibt"
-
- #? Eastern Mari
- Locale["mhr"]["support"] = "yandex-only"
- Locale["mhr"]["name"] = "Eastern Mari"
- Locale["mhr"]["endonym"] = "Олык марий"
- #Locale["mhr"]["translations-of"]
- #Locale["mhr"]["definitions-of"]
- #Locale["mhr"]["synonyms"]
- #Locale["mhr"]["examples"]
- #Locale["mhr"]["see-also"]
- Locale["mhr"]["family"] = "Uralic"
- Locale["mhr"]["iso"] = "mhr"
- Locale["mhr"]["glotto"] = "east2328"
- Locale["mhr"]["script"] = "Cyrl"
-
- #? Faroese
- Locale["fo"]["support"] = "unstable"
- Locale["fo"]["name"] = "Faroese"
- Locale["fo"]["endonym"] = "Føroyskt"
- #Locale["fo"]["translations-of"]
- #Locale["fo"]["definitions-of"]
- #Locale["fo"]["synonyms"]
- #Locale["fo"]["examples"]
- #Locale["fo"]["see-also"]
- Locale["fo"]["family"] = "Indo-European"
- Locale["fo"]["iso"] = "fao"
- Locale["fo"]["glotto"] = "faro1244"
- Locale["fo"]["script"] = "Latn"
-
- #? Guarani
- Locale["gn"]["support"] = "unstable"
- Locale["gn"]["name"] = "Guarani"
- Locale["gn"]["endonym"] = "Avañe'ẽ"
- #Locale["gn"]["translations-of"]
- #Locale["gn"]["definitions-of"]
- #Locale["gn"]["synonyms"]
- #Locale["gn"]["examples"]
- #Locale["gn"]["see-also"]
- Locale["gn"]["family"] = "Tupian"
- Locale["gn"]["iso"] = "grn"
- Locale["gn"]["glotto"] = "para1311"
- Locale["gn"]["script"] = "Latn"
-
- #? Hill Mari
- Locale["mrj"]["support"] = "yandex-only"
- Locale["mrj"]["name"] = "Hill Mari"
- Locale["mrj"]["endonym"] = "Кырык мары"
- #Locale["mrj"]["translations-of"]
- #Locale["mrj"]["definitions-of"]
- #Locale["mrj"]["synonyms"]
- #Locale["mrj"]["examples"]
- #Locale["mrj"]["see-also"]
- Locale["mrj"]["family"] = "Uralic"
- Locale["mrj"]["iso"] = "mrj"
- Locale["mrj"]["glotto"] = "west2392"
- Locale["mrj"]["script"] = "Cyrl"
-
- #? Interlingue
- Locale["ie"]["support"] = "unstable"
- Locale["ie"]["name"] = "Interlingue"
- Locale["ie"]["endonym"] = "Interlingue"
- #Locale["ie"]["translations-of"]
- #Locale["ie"]["definitions-of"]
- #Locale["ie"]["synonyms"]
- #Locale["ie"]["examples"]
- #Locale["ie"]["see-also"]
- Locale["ie"]["family"] = "Artificial Language"
- Locale["ie"]["iso"] = "ile"
- Locale["ie"]["glotto"] = "occi1241"
- Locale["ie"]["script"] = "Latn"
-
- #? Occitan
- Locale["oc"]["support"] = "unstable"
- Locale["oc"]["name"] = "Occitan"
- Locale["oc"]["endonym"] = "Occitan"
- #Locale["oc"]["translations-of"]
- #Locale["oc"]["definitions-of"]
- #Locale["oc"]["synonyms"]
- #Locale["oc"]["examples"]
- #Locale["oc"]["see-also"]
- Locale["oc"]["family"] = "Indo-European"
- Locale["oc"]["iso"] = "oci"
- Locale["oc"]["glotto"] = "occi1239"
- Locale["oc"]["script"] = "Latn"
-
- #? Oromo
- Locale["om"]["support"] = "unstable"
- Locale["om"]["name"] = "Oromo"
- Locale["om"]["endonym"] = "Afaan Oromoo"
- #Locale["om"]["translations-of"]
- #Locale["om"]["definitions-of"]
- #Locale["om"]["synonyms"]
- #Locale["om"]["examples"]
- #Locale["om"]["see-also"]
- Locale["om"]["family"] = "Afro-Asiatic"
- Locale["om"]["iso"] = "orm"
- Locale["om"]["glotto"] = "nucl1736"
- Locale["om"]["script"] = "Latn"
-
- #? Papiamento
- Locale["pap"]["support"] = "yandex-only"
- Locale["pap"]["name"] = "Papiamento"
- Locale["pap"]["endonym"] = "Papiamentu"
- #Locale["pap"]["translations-of"]
- #Locale["pap"]["definitions-of"]
- #Locale["pap"]["synonyms"]
- #Locale["pap"]["examples"]
- #Locale["pap"]["see-also"]
- Locale["pap"]["family"] = "Indo-European"
- Locale["pap"]["iso"] = "pap"
- Locale["pap"]["glotto"] = "papi1253"
- Locale["pap"]["script"] = "Latn"
-
- #? Romansh
- Locale["rm"]["support"] = "unstable"
- Locale["rm"]["name"] = "Romansh"
- Locale["rm"]["endonym"] = "Rumantsch"
- #Locale["rm"]["translations-of"]
- #Locale["rm"]["definitions-of"]
- #Locale["rm"]["synonyms"]
- #Locale["rm"]["examples"]
- #Locale["rm"]["see-also"]
- Locale["rm"]["family"] = "Indo-European"
- Locale["rm"]["iso"] = "roh"
- Locale["rm"]["glotto"] = "roma1326"
- Locale["rm"]["script"] = "Latn"
-
- #? Tigrinya
- Locale["ti"]["support"] = "unstable"
- Locale["ti"]["name"] = "Tigrinya"
- Locale["ti"]["endonym"] = "ትግርኛ"
- #Locale["ti"]["translations-of"]
- #Locale["ti"]["definitions-of"]
- #Locale["ti"]["synonyms"]
- #Locale["ti"]["examples"]
- #Locale["ti"]["see-also"]
- Locale["ti"]["family"] = "Afro-Asiatic"
- Locale["ti"]["iso"] = "tir"
- Locale["ti"]["glotto"] = "tigr1271"
- Locale["ti"]["script"] = "Ethi"
-
- #? Tibetan (Standard Tibetan)
- Locale["bo"]["support"] = "unstable"
- Locale["bo"]["name"] = "Tibetan"
- Locale["bo"]["endonym"] = "བོད་ཡིག"
- #Locale["bo"]["translations-of"]
- #Locale["bo"]["definitions-of"]
- #Locale["bo"]["synonyms"]
- #Locale["bo"]["examples"]
- #Locale["bo"]["see-also"]
- Locale["bo"]["family"] = "Sino-Tibetan"
- Locale["bo"]["iso"] = "bod"
- Locale["bo"]["glotto"] = "tibe1272"
- Locale["bo"]["script"] = "Tibt"
-
- #? Udmurt
- Locale["udm"]["support"] = "yandex-only"
- Locale["udm"]["name"] = "Udmurt"
- Locale["udm"]["endonym"] = "удмурт"
- #Locale["udm"]["translations-of"]
- #Locale["udm"]["definitions-of"]
- #Locale["udm"]["synonyms"]
- #Locale["udm"]["examples"]
- #Locale["udm"]["see-also"]
- Locale["udm"]["family"] = "Uralic"
- Locale["udm"]["iso"] = "udm"
- Locale["udm"]["glotto"] = "udmu1245"
- Locale["udm"]["script"] = "Cyrl"
-
- #? Volapük
- Locale["vo"]["support"] = "unstable"
- Locale["vo"]["name"] = "Volapük"
- Locale["vo"]["endonym"] = "Volapük"
- #Locale["vo"]["translations-of"]
- #Locale["vo"]["definitions-of"]
- #Locale["vo"]["synonyms"]
- #Locale["vo"]["examples"]
- #Locale["vo"]["see-also"]
- Locale["vo"]["family"] = "Artificial Language"
- Locale["vo"]["iso"] = "vol"
- #Locale["vo"]["glotto"]
- Locale["vo"]["script"] = "Latn"
-
- #? Wolof
- Locale["wo"]["support"] = "unstable"
- Locale["wo"]["name"] = "Wolof"
- Locale["wo"]["endonym"] = "Wollof"
- #Locale["wo"]["translations-of"]
- #Locale["wo"]["definitions-of"]
- #Locale["wo"]["synonyms"]
- #Locale["wo"]["examples"]
- #Locale["wo"]["see-also"]
- Locale["wo"]["family"] = "Atlantic-Congo"
- Locale["wo"]["iso"] = "wol"
- Locale["wo"]["glotto"] = "wolo1247"
- Locale["wo"]["script"] = "Latn"
-
- #? Cherokee
- Locale["chr"]["support"] = "unstable"
- Locale["chr"]["name"] = "Cherokee"
- Locale["chr"]["endonym"] = "ᏣᎳᎩ"
- #Locale["chr"]["translations-of"]
- #Locale["chr"]["definitions-of"]
- #Locale["chr"]["synonyms"]
- #Locale["chr"]["examples"]
- #Locale["chr"]["see-also"]
- Locale["chr"]["family"] = "Iroquoian"
- Locale["chr"]["iso"] = "chr"
- Locale["chr"]["glotto"] = "cher1273"
- Locale["chr"]["script"] = "Cher"
-
- #? Emoji
- Locale["emj"]["status"] = "non-language"
- Locale["emj"]["support"] = "yandex-only"
- Locale["emj"]["name"] = "Emoji"
- Locale["emj"]["endonym"] = "Emoji"
}
# Initialize aliases of all locales supported.
function initLocaleAlias( i) {
for (i in Locale) {
# ISO 639-3 codes as aliases
- LocaleAlias[Locale[i]["iso"]] = i
-
+ if ("iso" in Locale[i])
+ LocaleAlias[Locale[i]["iso"]] = i
# Names and endonyms as aliases
- LocaleAlias[tolower(Locale[i]["name"])] = i
+ if ("name" in Locale[i])
+ LocaleAlias[tolower(Locale[i]["name"])] = i
if ("name2" in Locale[i])
LocaleAlias[tolower(Locale[i]["name2"])] = i
- LocaleAlias[tolower(Locale[i]["endonym"])] = i
+ if ("endonym" in Locale[i])
+ LocaleAlias[tolower(Locale[i]["endonym"])] = i
+ if ("endonym2" in Locale[i])
+ LocaleAlias[tolower(Locale[i]["endonym2"])] = i
}
# Other aliases
@@ -1883,7 +2793,11 @@ function initLocaleAlias( i) {
LocaleAlias["ji"] = "yi" # withdrawn language code for Yiddish
LocaleAlias["jw"] = "jv" # withdrawn language code for Javanese
LocaleAlias["kurdish"] = "ku" # Kurdish: default to "ku" (N.B. Google uses this code for Kurmanji)
+ LocaleAlias["mari"] = "mhr" # Mari: default to "mhr" (Eastern Mari)
LocaleAlias["mo"] = "ro" # Moldavian or Moldovan considered a variant of the Romanian language
+ LocaleAlias["moldavian"] = "ro"
+ LocaleAlias["moldovan"] = "ro"
+ LocaleAlias["mww"] = "hmn" # mww (Hmong Daw) treated the same as hmn (the inclusive code for Hmong)
LocaleAlias["nb"] = "no" # Google Translate does not distinguish between Bokmål and Nynorsk (but Bing does!)
LocaleAlias["nn"] = "no"
LocaleAlias["pt"] = "pt-BR" # Portuguese: default to Brazilian Portuguese (as in Google Translate)
@@ -1899,8 +2813,8 @@ function initLocaleAlias( i) {
LocaleAlias["zh-Hant"] = "zh-TW"
LocaleAlias["zho"] = "zh-CN"
LocaleAlias["chinese"] = "zh-CN"
- LocaleAlias["tlh-Latn"] = "tlh"
- LocaleAlias["tlh-Piqd"] = "tlh-Qaak"
+ LocaleAlias["tlh"] = "tlh-Latn"
+ LocaleAlias["mni"] = "mni-Mtei" # Meitei: default to Meitei Mayek
# TODO: more aliases
}
@@ -1910,285 +2824,3 @@ function initLocaleDisplay( i) {
Locale[i]["display"] = show(Locale[i]["endonym"], i)
}
}
-
-# Get locale key by language code or alias.
-function getCode(code, group) {
- if (code == "auto" || code in Locale)
- return code
- else if (code in LocaleAlias)
- return LocaleAlias[code]
- else if (tolower(code) in LocaleAlias)
- return LocaleAlias[tolower(code)]
-
- # Remove unidentified region or script code
- match(code, /^([[:alpha:]][[:alpha:]][[:alpha:]]?)-(.*)$/, group)
- if (group[1])
- return group[1]
-
- return # return nothing if not found
-}
-
-# Return the name of a language.
-function getName(code) {
- return Locale[getCode(code)]["name"]
-}
-
-# Return all the names of a language, separated by "/"
-function getNames(code) {
- if ("name2" in Locale[getCode(code)])
- return Locale[getCode(code)]["name"] " / " Locale[getCode(code)]["name2"]
- else
- return Locale[getCode(code)]["name"]
-}
-
-# Return the endonym of a language.
-function getEndonym(code) {
- return Locale[getCode(code)]["endonym"]
-}
-
-# Return the string for displaying the endonym of a language.
-function getDisplay(code) {
- return Locale[getCode(code)]["display"]
-}
-
-# Return formatted text for "translations of".
-function showTranslationsOf(code, text, fmt) {
- fmt = Locale[getCode(code)]["translations-of"]
- if (!fmt) fmt = Locale["en"]["translations-of"]
- return sprintf(fmt, text)
-}
-
-# Return formatted text for "definitions of".
-function showDefinitionsOf(code, text, fmt) {
- fmt = Locale[getCode(code)]["definitions-of"]
- if (!fmt) fmt = Locale["en"]["definitions-of"]
- return sprintf(fmt, text)
-}
-
-# Return a string of "synonyms".
-function showSynonyms(code, tmp) {
- tmp = Locale[getCode(code)]["synonyms"]
- if (!tmp) tmp = Locale["en"]["synonyms"]
- return tmp
-}
-
-# Return a string of "examples".
-function showExamples(code, tmp) {
- tmp = Locale[getCode(code)]["examples"]
- if (!tmp) tmp = Locale["en"]["examples"]
- return tmp
-}
-
-# Return a string of "see also".
-function showSeeAlso(code, tmp) {
- tmp = Locale[getCode(code)]["see-also"]
- if (!tmp) tmp = Locale["en"]["see-also"]
- return tmp
-}
-
-# Return the family of a language.
-function getFamily(code) {
- return Locale[getCode(code)]["family"]
-}
-
-# Return the ISO 639-3 code of a language.
-function getISO(code) {
- return Locale[getCode(code)]["iso"]
-}
-
-# Return the Glottocode of a language.
-function getGlotto(code) {
- return Locale[getCode(code)]["glotto"]
-}
-
-# Return the ISO 15924 script code of a language.
-function getScript(code) {
- return Locale[getCode(code)]["script"]
-}
-
-# Return 1 if a language is R-to-L; otherwise return 0.
-function isRTL(code) {
- return Locale[getCode(code)]["rtl"] ? 1 : 0
-}
-
-# Return 1 if Google provides dictionary data for a language; otherwise return 0.
-function hasDictionary(code) {
- return Locale[getCode(code)]["dictionary"] ? 1 : 0
-}
-
-# Comparator using getName().
-function compName(i1, v1, i2, v2) {
- if (getName(i1) < getName(i2))
- return -1
- else
- return (getName(i1) != getName(i2))
-}
-
-# Return the name of script (writing system).
-# See:
-#
-function scriptName(code) {
- switch (code) {
- case "Arab": return "Arabic"
- case "Armn": return "Armenian"
- case "Beng": return "Bengali"
- case "Cher": return "Cherokee"
- case "Cyrl": return "Cyrillic"
- case "Deva": return "Devanagari"
- case "Ethi": return "Ethiopic (Geʻez)"
- case "Geor": return "Georgian (Mkhedruli)"
- case "Grek": return "Greek"
- case "Gujr": return "Gujarati"
- case "Guru": return "Gurmukhi"
- case "Hani": return "Han"
- case "Hans": return "Han (Simplified)"
- case "Hant": return "Han (Traditional)"
- case "Hebr": return "Hebrew"
- case "Jpan": return "Japanese (Han + Hiragana + Katakana)"
- case "Khmr": return "Khmer"
- case "Knda": return "Kannada"
- case "Kore": return "Korean (Hangul + Han)"
- case "Laoo": return "Lao"
- case "Latn": return "Latin"
- case "Mlym": return "Malayalam"
- case "Mymr": return "Myanmar"
- case "Orya": return "Oriya"
- case "Piqd": return "Klingon (pIqaD)"
- case "Sinh": return "Sinhala"
- case "Taml": return "Tamil"
- case "Telu": return "Telugu"
- case "Thai": return "Thai"
- case "Tibt": return "Tibetan"
- default: return "Unknown"
- }
-}
-
-# Return detailed information of a language as a string.
-function getDetails(code, group, iso, script) {
- if (code == "auto" || !getCode(code)) {
- e("[ERROR] Language not found: " code "\n" \
- " Run '-reference / -R' to see a list of available languages.")
- exit 1
- }
-
- script = scriptName(getScript(code))
- if (isRTL(code)) script = script " (R-to-L)"
- split(getISO(code), group, "-")
- iso = group[1]
- return ansi("bold", sprintf("%s\n", getDisplay(code))) \
- sprintf("%-22s%s\n", "Name", ansi("bold", getNames(code))) \
- sprintf("%-22s%s\n", "Family", ansi("bold", getFamily(code))) \
- sprintf("%-22s%s\n", "Writing system", ansi("bold", script)) \
- sprintf("%-22s%s\n", "Code", ansi("bold", getCode(code))) \
- sprintf("%-22s%s\n", "ISO 639-3", ansi("bold", iso)) \
- sprintf("%-22s%s\n", "SIL", ansi("bold", "https://iso639-3.sil.org/code/" iso)) \
- sprintf("%-22s%s\n", "Glottolog", getGlotto(code) ?
- ansi("bold", "https://glottolog.org/resource/languoid/id/" getGlotto(code)) : "") \
- sprintf("%-22s%s", "Wikipedia", ansi("bold", "https://en.wikipedia.org/wiki/ISO_639:" iso))
-}
-
-# Add /slashes/ for IPA phonemic notations and (parentheses) for others.
-# Parameters:
-# code
-function showPhonetics(phonetics, code) {
- if (code && getCode(code) == "en")
- return "/" phonetics "/"
- else
- return "(" phonetics ")"
-}
-
-# Convert a logical string to visual; don't right justify RTL lines.
-# Parameters:
-# code: ignore to apply bidirectional algorithm on every string
-function show(text, code, command, temp) {
- if (!code || isRTL(code)) {
- if (Cache[text][0])
- return Cache[text][0]
- else {
- if ((FriBidi || (code && isRTL(code))) && BiDiNoPad) {
- command = "echo " parameterize(text) PIPE BiDiNoPad
- command | getline temp
- close(command)
- } else # non-RTL language, or FriBidi not installed
- temp = text
- return Cache[text][0] = temp
- }
- } else
- return text
-}
-
-# Convert a logical string to visual and right justify RTL lines.
-# Parameters:
-# code: ignore to apply bidirectional algorithm on every string
-# width: ignore to use default width for padding
-function s(text, code, width, command, temp) {
- if (!code || isRTL(code)) {
- if (!width) width = Option["width"]
- if (Cache[text][width])
- return Cache[text][width]
- else {
- if ((FriBidi || (code && isRTL(code))) && BiDi) {
- command = "echo " parameterize(text) PIPE sprintf(BiDi, width)
- command | getline temp
- close(command)
- } else # non-RTL language, or FriBidi not installed
- temp = text
- return Cache[text][width] = temp
- }
- } else
- return text
-}
-
-# Convert a logical string to visual with a certain level of indentation.
-# Parameters:
-# level: level of indentation
-# code: ignore to apply left indentation
-# width: ignore to use default width for padding
-function ins(level, text, code, width, i, temp) {
- if (code && isRTL(code)) {
- if (!width) width = Option["width"]
- return s(text, code, width - Option["indent"] * level)
- } else
- return replicate(" ", Option["indent"] * level) text
-}
-
-# Parse a POSIX locale identifier and return the language code;
-# Identified by both language identifier and region identifier.
-# Parameters:
-# lang = [language[_territory][.codeset][@modifier]]
-# See:
-function parseLang(lang, code, group) {
- match(lang, /^([a-z][a-z][a-z]?)(_|$)/, group)
- code = getCode(group[1])
-
- # Detect region identifier
- ## Regions using Chinese Simplified: China, Singapore
- if (lang ~ /^zh_(CN|SG)/) code = "zh-CN"
- ## Regions using Chinese Traditional: Taiwan, Hong Kong
- else if (lang ~ /^zh_(TW|HK)/) code = "zh-TW"
-
- # FIXME: handle unrecognized language code
- if (!code) code = "en"
-
- return code
-}
-
-# Initialize `UserLang`.
-function initUserLang( lang, utf) {
- if (lang = ENVIRON["LC_ALL"]) {
- if (!UserLocale) UserLocale = lang
- utf = utf || tolower(lang) ~ /utf-?8$/
- }
- if (lang = ENVIRON["LANG"]) {
- if (!UserLocale) UserLocale = lang
- utf = utf || tolower(lang) ~ /utf-?8$/
- }
- if (!UserLocale) {
- UserLocale = "en_US.UTF-8"
- utf = 1
- }
- if (!utf)
- w("[WARNING] Your locale codeset (" UserLocale ") is not UTF-8.")
-
- UserLang = parseLang(UserLocale)
-}
diff --git a/include/LanguageHelper.awk b/include/LanguageHelper.awk
new file mode 100644
index 00000000..4eaf22ab
--- /dev/null
+++ b/include/LanguageHelper.awk
@@ -0,0 +1,393 @@
+####################################################################
+# LanguageHelper.awk #
+####################################################################
+
+# Get locale key by language code or alias.
+function getCode(code, group) {
+ if (code == "auto" || code in Locale)
+ return code
+ else if (code in LocaleAlias)
+ return LocaleAlias[code]
+ else if (tolower(code) in LocaleAlias)
+ return LocaleAlias[tolower(code)]
+
+ # Remove unidentified region or script code
+ match(code, /^([[:alpha:]][[:alpha:]][[:alpha:]]?)-(.*)$/, group)
+ if (group[1])
+ return group[1]
+
+ return # return nothing if not found
+}
+
+# Return the name of a language.
+function getName(code) {
+ return Locale[getCode(code)]["name"]
+}
+
+# Return all the names of a language, separated by "/"
+function getNames(code) {
+ if ("name2" in Locale[getCode(code)])
+ return Locale[getCode(code)]["name"] " / " Locale[getCode(code)]["name2"]
+ else
+ return Locale[getCode(code)]["name"]
+}
+
+# Return the endonym of a language.
+function getEndonym(code) {
+ return Locale[getCode(code)]["endonym"]
+}
+
+# Return the string for displaying the endonym of a language.
+function getDisplay(code) {
+ return Locale[getCode(code)]["display"]
+}
+
+# Return formatted text for "translations of".
+function showTranslationsOf(code, text, fmt) {
+ fmt = Locale[getCode(code)]["translations-of"]
+ if (!fmt) fmt = Locale["en"]["translations-of"]
+ return sprintf(fmt, text)
+}
+
+# Return formatted text for "definitions of".
+function showDefinitionsOf(code, text, fmt) {
+ fmt = Locale[getCode(code)]["definitions-of"]
+ if (!fmt) fmt = Locale["en"]["definitions-of"]
+ return sprintf(fmt, text)
+}
+
+# Return a string of "synonyms".
+function showSynonyms(code, tmp) {
+ tmp = Locale[getCode(code)]["synonyms"]
+ if (!tmp) tmp = Locale["en"]["synonyms"]
+ return tmp
+}
+
+# Return a string of "examples".
+function showExamples(code, tmp) {
+ tmp = Locale[getCode(code)]["examples"]
+ if (!tmp) tmp = Locale["en"]["examples"]
+ return tmp
+}
+
+# Return a string of "see also".
+function showSeeAlso(code, tmp) {
+ tmp = Locale[getCode(code)]["see-also"]
+ if (!tmp) tmp = Locale["en"]["see-also"]
+ return tmp
+}
+
+# Return the family of a language.
+function getFamily(code) {
+ return Locale[getCode(code)]["family"]
+}
+
+# Return the branch of a language.
+function getBranch(code) {
+ return Locale[getCode(code)]["branch"]
+}
+
+# Return the ISO 639-3 code of a language.
+function getISO(code) {
+ return Locale[getCode(code)]["iso"]
+}
+
+# Return the Glottocode of a language.
+function getGlotto(code) {
+ return Locale[getCode(code)]["glotto"]
+}
+
+# Return the ISO 15924 script code of a language.
+function getScript(code) {
+ return Locale[getCode(code)]["script"]
+}
+
+# Return 1 if a language is R-to-L; otherwise return 0.
+function isRTL(code) {
+ return Locale[getCode(code)]["rtl"] ? 1 : 0
+}
+
+# Return 1 if Google provides dictionary data for a language; otherwise return 0.
+function hasDictionary(code) {
+ return Locale[getCode(code)]["dictionary"] ? 1 : 0
+}
+
+# Comparator using getName().
+function compName(i1, v1, i2, v2) {
+ if (getName(i1) < getName(i2))
+ return -1
+ else
+ return (getName(i1) != getName(i2))
+}
+
+# Return the name of script (writing system).
+# See:
+#
+function scriptName(code) {
+ switch (code) {
+ case "Arab": return "Arabic"
+ case "Armn": return "Armenian"
+ case "Beng": return "Bengali"
+ case "Cans": return "Canadian Aboriginal Syllabics"
+ case "Cher": return "Cherokee"
+ case "Cyrl": return "Cyrillic"
+ case "Deva": return "Devanagari"
+ case "Ethi": return "Ethiopic (Geʻez)"
+ case "Geor": return "Georgian (Mkhedruli)"
+ case "Grek": return "Greek"
+ case "Gujr": return "Gujarati"
+ case "Guru": return "Gurmukhi"
+ case "Hani": return "Han"
+ case "Hans": return "Han (Simplified)"
+ case "Hant": return "Han (Traditional)"
+ case "Hebr": return "Hebrew"
+ case "Jpan": return "Japanese (Han + Hiragana + Katakana)"
+ case "Khmr": return "Khmer"
+ case "Knda": return "Kannada"
+ case "Kore": return "Korean (Hangul + Han)"
+ case "Laoo": return "Lao"
+ case "Latn": return "Latin"
+ case "Mlym": return "Malayalam"
+ case "Mong": return "Mongolian"
+ case "Mtei": return "Meitei Mayek"
+ case "Mymr": return "Myanmar"
+ case "Orya": return "Oriya"
+ case "Sinh": return "Sinhala"
+ case "Taml": return "Tamil"
+ case "Telu": return "Telugu"
+ case "Thaa": return "Thaana"
+ case "Thai": return "Thai"
+ case "Tibt": return "Tibetan"
+ default: return "Unknown"
+ }
+}
+
+# Return the regions that a language is spoken in, as an English string.
+function getSpokenIn(code, i, j, r, regions, str) {
+ r = NULLSTR
+ str = Locale[getCode(code)]["spoken-in"]
+ if (str) {
+ split(str, regions, /\s?;\s?/)
+ j = 0
+ for (i in regions) {
+ r = r regions[i]
+ j++
+ if (j < length(regions) - 1)
+ r = r ", "
+ else if (j == length(regions) - 1)
+ r = r " and "
+ }
+ }
+ return r
+}
+
+# Return the regions that a script is written in, as an English string.
+function getWrittenIn(code, i, j, r, regions, str) {
+ r = NULLSTR
+ str = Locale[getCode(code)]["written-in"]
+ if (str) {
+ split(str, regions, /\s?;\s?/)
+ j = 0
+ for (i in regions) {
+ r = r regions[i]
+ j++
+ if (j < length(regions) - 1)
+ r = r ", "
+ else if (j == length(regions) - 1)
+ r = r " and "
+ }
+ }
+ return r
+}
+
+# Return the extra description of a language.
+function getDescription(code) {
+ return Locale[getCode(code)]["description"]
+}
+
+# Return 1 if a language is supported by Google; otherwise return 0.
+function isSupportedByGoogle(code, engines, i, str) {
+ str = Locale[getCode(code)]["supported-by"]
+ if (str) {
+ split(str, engines, /\s?;\s?/)
+ for (i in engines)
+ if (engines[i] == "google") return 1
+ }
+ return 0
+}
+
+# Return 1 if a language is supported by Bing; otherwise return 0.
+function isSupportedByBing(code, engines, i, str) {
+ str = Locale[getCode(code)]["supported-by"]
+ if (str) {
+ split(str, engines, /\s?;\s?/)
+ for (i in engines)
+ if (engines[i] == "bing") return 1
+ }
+ return 0
+}
+
+# Return detailed information of a language as a string.
+function getDetails(code, article, desc, group, iso, name, names, script, writing) {
+ if (code == "auto" || !getCode(code)) {
+ e("[ERROR] Language not found: " code "\n" \
+ " Run '-reference / -R' to see a list of available languages.")
+ exit 1
+ }
+
+ script = scriptName(getScript(code))
+ if (isRTL(code)) script = script " (R-to-L)"
+
+ split(getISO(code), group, "-")
+ iso = group[1]
+
+ name = getName(code)
+ names = getNames(code)
+ if (match(name, /\(.*\)/)) {
+ writing = substr(name, match(name, /\(.*\)/) + 1)
+ writing = substr(writing, 1, length(writing) - 1)
+ name = substr(name, 1, match(name, /\(.*\)/) - 2)
+ }
+
+ if (getDescription(code))
+ desc = sprintf("%s is %s.", names, getDescription(code))
+ else if (getBranch(code)) {
+ article = match(tolower(getBranch(code)), /^[aeiou]/) ? "an" : "a"
+ if (iso == "eng")
+ desc = sprintf("%s is %s %s language spoken %s.",
+ names, article, getBranch(code), getSpokenIn(code))
+ else
+ desc = sprintf("%s is %s %s language spoken mainly in %s.",
+ names, article, getBranch(code), getSpokenIn(code))
+ }
+ else if (getFamily(code) == NULLSTR || tolower(getFamily(code)) == "language isolate")
+ desc = sprintf("%s is a language spoken mainly in %s.", names, getSpokenIn(code))
+ else
+ desc = sprintf("%s is a language of the %s family, spoken mainly in %s.",
+ names, getFamily(code), getSpokenIn(code))
+ if (writing && getWrittenIn(code))
+ desc = desc sprintf(" The %s writing system is officially used in %s.",
+ tolower(writing), getWrittenIn(code))
+
+ return ansi("bold", sprintf("%s\n", getDisplay(code))) \
+ sprintf("%-22s%s\n", "Name", ansi("bold", names)) \
+ sprintf("%-22s%s\n", "Family", ansi("bold", getFamily(code))) \
+ sprintf("%-22s%s\n", "Writing system", ansi("bold", script)) \
+ sprintf("%-22s%s\n", "Code", ansi("bold", getCode(code))) \
+ sprintf("%-22s%s\n", "ISO 639-3", ansi("bold", iso)) \
+ sprintf("%-22s%s\n", "SIL", ansi("bold", "https://iso639-3.sil.org/code/" iso)) \
+ sprintf("%-22s%s\n", "Glottolog", getGlotto(code) ?
+ ansi("bold", "https://glottolog.org/resource/languoid/id/" getGlotto(code)) : "") \
+ sprintf("%-22s%s\n", "Wikipedia", ansi("bold", "https://en.wikipedia.org/wiki/ISO_639:" iso)) \
+ (Locale[getCode(code)]["supported-by"] ? # FIXME
+ sprintf("%-22s%s\n", "Translator support", sprintf("Google [%s] Bing [%s]",
+ isSupportedByGoogle(code) ? "✔" : "✘", isSupportedByBing(code) ? "✔" : "✘")) : "") \
+ (Locale[getCode(code)]["spoken-in"] ? # FIXME
+ ansi("bold", sprintf("\n%s", desc)) : "")
+}
+
+# Add /slashes/ for IPA phonemic notations and (parentheses) for others.
+# Parameters:
+# code
+function showPhonetics(phonetics, code) {
+ if (code && getCode(code) == "en")
+ return "/" phonetics "/"
+ else
+ return "(" phonetics ")"
+}
+
+# Convert a logical string to visual; don't right justify RTL lines.
+# Parameters:
+# code: ignore to apply bidirectional algorithm on every string
+function show(text, code, command, temp) {
+ if (!code || isRTL(code)) {
+ if (Cache[text][0])
+ return Cache[text][0]
+ else {
+ if ((FriBidi || (code && isRTL(code))) && BiDiNoPad) {
+ command = "echo " parameterize(text) PIPE BiDiNoPad
+ command | getline temp
+ close(command)
+ } else # non-RTL language, or FriBidi not installed
+ temp = text
+ return Cache[text][0] = temp
+ }
+ } else
+ return text
+}
+
+# Convert a logical string to visual and right justify RTL lines.
+# Parameters:
+# code: ignore to apply bidirectional algorithm on every string
+# width: ignore to use default width for padding
+function s(text, code, width, command, temp) {
+ if (!code || isRTL(code)) {
+ if (!width) width = Option["width"]
+ if (Cache[text][width])
+ return Cache[text][width]
+ else {
+ if ((FriBidi || (code && isRTL(code))) && BiDi) {
+ command = "echo " parameterize(text) PIPE sprintf(BiDi, width)
+ command | getline temp
+ close(command)
+ } else # non-RTL language, or FriBidi not installed
+ temp = text
+ return Cache[text][width] = temp
+ }
+ } else
+ return text
+}
+
+# Convert a logical string to visual with a certain level of indentation.
+# Parameters:
+# level: level of indentation
+# code: ignore to apply left indentation
+# width: ignore to use default width for padding
+function ins(level, text, code, width, i, temp) {
+ if (code && isRTL(code)) {
+ if (!width) width = Option["width"]
+ return s(text, code, width - Option["indent"] * level)
+ } else
+ return replicate(" ", Option["indent"] * level) text
+}
+
+# Parse a POSIX locale identifier and return the language code;
+# Identified by both language identifier and region identifier.
+# Parameters:
+# lang = [language[_territory][.codeset][@modifier]]
+# See:
+function parseLang(lang, code, group) {
+ match(lang, /^([a-z][a-z][a-z]?)(_|$)/, group)
+ code = getCode(group[1])
+
+ # Detect region identifier
+ ## Regions using Chinese Simplified: China, Singapore
+ if (lang ~ /^zh_(CN|SG)/) code = "zh-CN"
+ ## Regions using Chinese Traditional: Taiwan, Hong Kong
+ else if (lang ~ /^zh_(TW|HK)/) code = "zh-TW"
+
+ # FIXME: handle unrecognized language code
+ if (!code) code = "en"
+
+ return code
+}
+
+# Initialize `UserLang`.
+function initUserLang( lang, utf) {
+ if (lang = ENVIRON["LC_ALL"]) {
+ if (!UserLocale) UserLocale = lang
+ utf = utf || tolower(lang) ~ /utf-?8$/
+ }
+ if (lang = ENVIRON["LANG"]) {
+ if (!UserLocale) UserLocale = lang
+ utf = utf || tolower(lang) ~ /utf-?8$/
+ }
+ if (!UserLocale) {
+ UserLocale = "en_US.UTF-8"
+ utf = 1
+ }
+ if (!utf)
+ w("[WARNING] Your locale codeset (" UserLocale ") is not UTF-8.")
+
+ UserLang = parseLang(UserLocale)
+}
diff --git a/include/Main.awk b/include/Main.awk
index 771ecd7e..d66add4c 100644
--- a/include/Main.awk
+++ b/include/Main.awk
@@ -8,7 +8,7 @@ function init() {
initBiDiTerm()
initBiDi()
- # (Languages.awk)
+ # (LanguageData.awk & LanguageHelper.awk)
initLocale()
initLocaleAlias()
initUserLang()
@@ -20,7 +20,7 @@ function init() {
Option["debug"] = 0
# Translation engine
- Option["engine"] = "google"
+ Option["engine"] = "auto"
# Display
Option["verbose"] = 1
@@ -59,10 +59,11 @@ function init() {
# Networking
Option["proxy"] = ENVIRON["HTTP_PROXY"] ? ENVIRON["HTTP_PROXY"] : ENVIRON["http_proxy"]
Option["user-agent"] = ENVIRON["USER_AGENT"] ? ENVIRON["USER_AGENT"] :
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) " \
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " \
"AppleWebKit/537.36 (KHTML, like Gecko) " \
- "Chrome/81.0.4044.138 " \
- "Safari/537.36"
+ "Chrome/104.0.0.0 " \
+ "Safari/537.36 " \
+ "Edg/104.0.1293.54"
Option["ip-version"] = 0
# Interactive shell
@@ -75,7 +76,8 @@ function init() {
Option["output"] = STDOUT
# Language preference
- Option["hl"] = ENVIRON["HOME_LANG"] ? ENVIRON["HOME_LANG"] : UserLang
+ Option["hl"] = ENVIRON["HOST_LANG"] ? ENVIRON["HOST_LANG"] :
+ ENVIRON["HOME_LANG"] ? ENVIRON["HOME_LANG"] : UserLang # FIXME[1.0]: HOME_LANG to be removed
Option["sl"] = ENVIRON["SOURCE_LANG"] ? ENVIRON["SOURCE_LANG"] : "auto"
Option["sls"][1] = Option["sl"]
Option["tl"][1] = ENVIRON["TARGET_LANG"] ? ENVIRON["TARGET_LANG"] : UserLang
@@ -137,13 +139,13 @@ function initMisc( command, group, temp) {
if (Option["no-bidi"] || BiDiTerm == "mlterm")
# mlterm implements its own padding
BiDi = BiDiNoPad = NULLSTR
- else if (!Option["force-bidi"] && BiDiTerm == "konsole") {
- # konsole implements no padding; we should handle this
+ else if (!Option["force-bidi"] && (BiDiTerm == "vte" || BiDiTerm == "konsole")) {
+ # vte & konsole implement no padding; we should handle this
BiDiNoPad = NULLSTR
BiDi = "sed \"s/'/\\\\\\'/\" | xargs -0 printf '%%%ss'"
}
- # (Languages.awk)
+ # (LanguageData.awk)
initLocaleDisplay()
# Disable everything stderr
@@ -229,8 +231,8 @@ BEGIN {
# FIXME[1.0]: to be removed
match(ARGV[pos], /^--?r$/)
if (RSTART) {
- w("[WARNING] Option '-r' has been deprecated since version 0.9.\n" \
- " Use option '-T' or '-reference' instead.")
+ w("[ERROR] Option '-r' has been deprecated since version 0.9.\n" \
+ " Use option '-T' or '-reference' instead.")
exit 1
}
@@ -241,21 +243,62 @@ BEGIN {
continue
}
- # -L CODES, -list CODES
- match(ARGV[pos], /^--?(L|list)(=(.*)?)?$/, group)
+ # -S, -list-engines
+ match(ARGV[pos], /^--?(S|list-e(n(g(i(n(es?)?)?)?)?)?)$/)
+ if (RSTART) {
+ InfoOnly = "list-engines"
+ continue
+ }
+
+ # -list-languages
+ match(ARGV[pos], /^--?(list-languages)$/)
+ if (RSTART) {
+ InfoOnly = "list-languages"
+ continue
+ }
+
+ # -list-languages-english
+ match(ARGV[pos], /^--?(list-languages-english)$/)
if (RSTART) {
- InfoOnly = "list"
+ InfoOnly = "list-languages-english"
+ continue
+ }
+
+ # -list-codes
+ match(ARGV[pos], /^--?(list-codes)$/)
+ if (RSTART) {
+ InfoOnly = "list-codes"
+ continue
+ }
+
+ # -list-all
+ match(ARGV[pos], /^--?(list-all)$/)
+ if (RSTART) {
+ InfoOnly = "list-all"
+ continue
+ }
+
+ # -L CODES, -linguist CODES
+ match(ARGV[pos], /^--?(L|linguist)(=(.*)?)?$/, group)
+ if (RSTART) {
+ InfoOnly = "language"
if (group[2]) {
if (group[3]) split(group[3], Option["tl"], "+")
} else
split(ARGV[++pos], Option["tl"], "+")
continue
}
-
- # -S, -list-engines
- match(ARGV[pos], /^--?(S|list-e(n(g(i(n(es?)?)?)?)?)?)$/)
+ # FIXME[1.0]: to be removed
+ # -list CODE
+ match(ARGV[pos], /^--?(list)(=(.*)?)?$/, group)
if (RSTART) {
- InfoOnly = "list-engines"
+ w("[WARNING] Option '-list' will be deprecated in the next version.\n" \
+ " Use '-L' / '-linguist' instead.")
+ InfoOnly = "language"
+ if (group[2]) {
+ if (group[3]) split(group[3], Option["tl"], "+")
+ } else
+ split(ARGV[++pos], Option["tl"], "+")
continue
}
@@ -669,9 +712,20 @@ BEGIN {
## Language preference options
- # -l CODE, -hl CODE, -lang CODE
- match(ARGV[pos], /^--?(l(a(ng?)?)?|hl)(=(.*)?)?$/, group)
+ # -hl CODE, -host CODE
+ match(ARGV[pos], /^--?(host|hl)(=(.*)?)?$/, group)
if (RSTART) {
+ Option["hl"] = group[2] ?
+ (group[3] ? group[3] : Option["hl"]) :
+ ARGV[++pos]
+ continue
+ }
+ # FIXME[1.0]: to be removed
+ # -l CODE, -lang CODE
+ match(ARGV[pos], /^--?(l(a(ng?)?)?)(=(.*)?)?$/, group)
+ if (RSTART) {
+ w("[WARNING] Option '-l' / '-lang' will be deprecated in the next version.\n" \
+ " Use '-hl' / '-host' instead.")
Option["hl"] = group[4] ?
(group[5] ? group[5] : Option["hl"]) :
ARGV[++pos]
@@ -701,7 +755,7 @@ BEGIN {
# Shortcut format
# 'CODE:CODE+...' or 'CODE=CODE+...'
- match(ARGV[pos], /^[{(\[]?((@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?\+)*(@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?)?)?(:|=)((@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?\+)*(@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?)?)[})\]]?$/, group)
+ match(ARGV[pos], /^[{(\[]?((@?[a-z][a-z][a-z]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?\+)*(@?[a-z][a-z][a-z]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?)?)?(:|=)((@?[a-z][a-z][a-z]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?\+)*(@?[a-z][a-z][a-z]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?)?)[})\]]?$/, group)
if (RSTART) {
if (group[1]) {
split(group[1], Option["sls"], "+")
@@ -776,12 +830,51 @@ BEGIN {
case "reference-english":
print getReference("name")
exit ExitCode
- case "list":
- print getList(Option["tl"])
- exit ExitCode
case "list-engines":
+ saveSortedIn = PROCINFO["sorted_in"]
+ PROCINFO["sorted_in"] = "@ind_num_asc"
for (translator in Translator)
print (Option["engine"] == translator ? "* " : " ") translator
+ PROCINFO["sorted_in"] = saveSortedIn
+ exit ExitCode
+ case "list-languages":
+ saveSortedIn = PROCINFO["sorted_in"]
+ PROCINFO["sorted_in"] = "@ind_num_asc"
+ for (code in Locale)
+ # only show languages that are supported
+ if (Locale[code]["supported-by"])
+ print getDisplay(Locale[code]["endonym"])
+ PROCINFO["sorted_in"] = saveSortedIn
+ exit ExitCode
+ case "list-languages-english":
+ saveSortedIn = PROCINFO["sorted_in"]
+ PROCINFO["sorted_in"] = "compName"
+ for (code in Locale)
+ # only show languages that are supported
+ if (Locale[code]["supported-by"])
+ print Locale[code]["name"] #(Locale[code]["name2"] ? " / " Locale[code]["name2"] : "")
+ PROCINFO["sorted_in"] = saveSortedIn
+ exit ExitCode
+ case "list-codes":
+ saveSortedIn = PROCINFO["sorted_in"]
+ PROCINFO["sorted_in"] = "@ind_num_asc"
+ for (code in Locale)
+ # only show languages that are supported
+ if (Locale[code]["supported-by"])
+ print code
+ PROCINFO["sorted_in"] = saveSortedIn
+ exit ExitCode
+ case "list-all":
+ saveSortedIn = PROCINFO["sorted_in"]
+ PROCINFO["sorted_in"] = "compName"
+ for (code in Locale)
+ # only show languages that are supported
+ if (Locale[code]["supported-by"])
+ printf("%-10s %-30s %s\n", code, Locale[code]["name"], getDisplay(Locale[code]["endonym"]))
+ PROCINFO["sorted_in"] = saveSortedIn
+ exit ExitCode
+ case "language":
+ print getLanguage(Option["tl"])
exit ExitCode
case "upgrade":
upgrade()
diff --git a/include/REPL.awk b/include/REPL.awk
index 26c719d7..ee836e55 100644
--- a/include/REPL.awk
+++ b/include/REPL.awk
@@ -57,18 +57,18 @@ function prompt( i, p, temp) {
if (p ~ /%_/)
gsub(/%_/, showTranslationsOf(Option["hl"]), p)
- # %l : home language
+ # %l : host language
if (p ~ /%l/)
gsub(/%l/, getDisplay(Option["hl"]), p)
- # %L : home language (English name)
+ # %L : host language (English name)
if (p ~ /%L/)
gsub(/%L/, getName(Option["hl"]), p)
# %s : source languages, separated by "+"
# 's' is the format-control character for string
- # %S : source languages (English names), seperated by "+"
+ # %S : source languages (English names), separated by "+"
if (p ~ /%S/) {
temp = getName(Option["sls"][1])
for (i = 2; i <= length(Option["sls"]); i++)
@@ -143,16 +143,32 @@ function repl(line, command, group, name, i, value, words) {
} else if (command ~ /^:set$/) {
name = words[2]
value = words[3]
- Option[name] = value
+ # :set sl and :set tl should work as intended
+ # TODO: support multiple language codes
+ if (name == "sl") {
+ delete Option["sls"]
+ Option["sls"][1] = value
+ } else if (name == "tl") {
+ delete Option["tl"]
+ Option["tl"][1] = value
+ } else {
+ Option[name] = value
+ }
} else if (command ~ /^:show$/) {
name = words[2]
print prettify("welcome-submessage", toString(Option[name], 1, 0, 1))
+ } else if (command ~ /^:swap$/) {
+ tl = Option["tl"][1]
+ Option["tl"][1] = Option["sls"][1]
+ Option["sls"][1] = tl
} else if (command ~ /^:engine$/) {
value = words[2]
Option["engine"] = value
initHttpService()
+ } else if (command ~ /^:reset$/) {
+ # TODO: reset source and target languages, etc.
} else {
- match(command, /^[{(\[]?((@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?\+)*(@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?)?)?(:|=)((@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?\+)*(@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?)?)[})\]]?$/, group)
+ match(command, /^[{(\[]?((@?[a-z][a-z][a-z]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?\+)*(@?[a-z][a-z][a-z]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?)?)?(:|=)((@?[a-z][a-z][a-z]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?\+)*(@?[a-z][a-z][a-z]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?)?)[})\]]?$/, group)
if (RSTART) {
if (group[1]) {
split(group[1], Option["sls"], "+")
diff --git a/include/Translate.awk b/include/Translate.awk
index a6084961..e5f171f7 100644
--- a/include/Translate.awk
+++ b/include/Translate.awk
@@ -119,10 +119,12 @@ function getResponse(text, sl, tl, hl,
if (HttpAuthUser && HttpAuthPass)
# TODO: digest auth
header = header "Proxy-Authorization: Basic " HttpAuthCredentials "\r\n"
+ l(header) # log request header
content = NULLSTR; isBody = 0
while (1) {
- print header |& HttpService
+ # separate header and body correctly with CRLF, per RFC 2616
+ print (header "\r\n") |& HttpService
while ((HttpService |& getline) > 0) {
if (isBody)
content = content ? content "\n" $0 : $0
@@ -189,6 +191,7 @@ function postResponse(text, sl, tl, hl, type,
if (HttpAuthUser && HttpAuthPass)
# TODO: digest auth
header = header "Proxy-Authorization: Basic " HttpAuthCredentials "\r\n"
+ l(header) # log request header
content = NULLSTR; isBody = 0
while (1) {
@@ -312,11 +315,11 @@ function translate(text, inline,
i, j, playlist, il, saveSortedIn) {
if (!getCode(Option["hl"])) {
- # Check if home language is supported
+ # Check if host language is supported
w("[WARNING] Unknown language code: " Option["hl"] ", fallback to English: en")
Option["hl"] = "en" # fallback to English
} else if (isRTL(Option["hl"])) {
- # Check if home language is R-to-L
+ # Check if host language is R-to-L
if (!FriBidi)
w("[WARNING] " getName(Option["hl"]) " is a right-to-left language, but FriBidi is not found.")
}
diff --git a/include/Translators/Apertium.awk b/include/Translators/Apertium.awk
index 717567fa..edf617df 100644
--- a/include/Translators/Apertium.awk
+++ b/include/Translators/Apertium.awk
@@ -71,7 +71,7 @@ function apertiumTranslate(text, sl, tl, hl,
if (Option["verbose"] < -1)
return il
else if (Option["verbose"] < 0)
- return getList(il)
+ return getLanguage(il)
# Generate output
if (!isVerbose) {
diff --git a/include/Translators/Auto.awk b/include/Translators/Auto.awk
new file mode 100644
index 00000000..333f82ac
--- /dev/null
+++ b/include/Translators/Auto.awk
@@ -0,0 +1,54 @@
+####################################################################
+# Auto.awk #
+####################################################################
+BEGIN { provides("auto") }
+
+function autoInit() {
+}
+
+function autoTTSUrl(text, tl) {
+ # TODO: support Bing
+ Option["engine"] = "google"
+ initHttpService()
+ return googleTTSUrl(text, tl)
+ # TODO: reset engine to auto
+}
+
+function autoWebTranslateUrl(uri, sl, tl, hl) {
+ # TODO: support Bing
+ Option["engine"] = "google"
+ initHttpService()
+ return googleWebTranslateUrl(uri, sl, tl, hl)
+ # TODO: reset engine to auto
+}
+
+function autoTranslate(text, sl, tl, hl,
+ isVerbose, toSpeech, returnPlaylist, returnIl,
+ ####
+ engine, temp) {
+ if ((sl == "auto" || isSupportedByGoogle(sl)) && (tl == "auto" || isSupportedByGoogle(tl))) {
+ # both source and target languages are supported by Google
+ engine = Option["engine"] # auto
+ Option["engine"] = "google"
+ initHttpService()
+ temp = googleTranslate(text, sl, tl, hl, isVerbose, toSpeech, returnPlaylist, returnIl)
+ Option["engine"] = engine
+ } else if ((sl == "auto" || isSupportedByBing(sl)) && (tl == "auto" || isSupportedByBing(tl))) {
+ # both source and target languages are supported by Bing
+ engine = Option["engine"] # auto
+ Option["engine"] = "bing"
+ initHttpService()
+ temp = bingTranslate(text, sl, tl, hl, isVerbose, toSpeech, returnPlaylist, returnIl)
+ Option["engine"] = engine
+ } else {
+ # TODO: translate between Google-only and Bing-only languages
+
+ # fallback to Google
+ engine = Option["engine"] # auto
+ Option["engine"] = "google"
+ initHttpService()
+ temp = googleTranslate(text, sl, tl, hl, isVerbose, toSpeech, returnPlaylist, returnIl)
+ Option["engine"] = engine
+ }
+ return temp
+}
diff --git a/include/Translators/BingTranslator.awk b/include/Translators/BingTranslator.awk
index c316dea5..7676b262 100644
--- a/include/Translators/BingTranslator.awk
+++ b/include/Translators/BingTranslator.awk
@@ -2,7 +2,7 @@
# BingTranslator.awk #
####################################################################
#
-# Last Updated: 25 Jul 2019
+# Last Updated: 8 Jun 2022
BEGIN { provides("bing") }
function bingInit() {
@@ -11,9 +11,9 @@ function bingInit() {
HttpPort = 80
}
-# [OBSOLETE?] Retrieve the Cookie and set IG.
-function bingSetIG( content, cookie, group, header, isBody,
- url, status, location) {
+# Set IG, IID, and BingTokenKey (a URL-encoded string containing token and key).
+function bingSetup( ast, content, cookie, group, header, isBody, key,
+ location, status, token, tokens, url) {
url = HttpPathPrefix "/translator"
header = "GET " url " HTTP/1.1\r\n" \
@@ -46,13 +46,36 @@ function bingSetIG( content, cookie, group, header, isBody,
if ((status == "301" || status == "302") && location)
content = curl(location)
# FIXME: cookie
-
Cookie = cookie
+
match(content, /IG:"([^"]+)"/, group)
if (group[1]) {
IG = group[1]
+ l(IG, "IG")
} else {
- e("[ERROR] Oops! Something went wrong and I can't translate it for you :(")
+ e("[ERROR] Failed to extract IG.")
+ exit 1
+ }
+
+ match(content, /data-iid="([^"]+)"/, group)
+ if (group[1]) {
+ IID = group[1]
+ l(IID, "IID")
+ } else {
+ e("[ERROR] Failed to extract IID.")
+ exit 1
+ }
+
+ match(content, /params_AbusePreventionHelper = ([^;]+);/, group)
+ if (group[1]) {
+ tokenize(tokens, group[1])
+ parseJson(ast, tokens)
+ key = ast[0 SUBSEP 0]
+ token = unparameterize(ast[0 SUBSEP 1])
+ BingTokenKey = sprintf("&token=%s&key=%s", quote(token), quote(key))
+ l(BingTokenKey, "BingTokenKey")
+ } else {
+ e("[ERROR] Failed to extract token & key.")
exit 1
}
}
@@ -126,11 +149,9 @@ function bingTTSUrl(text, tl,
function bingWebTranslateUrl(uri, sl, tl, hl, _sl, _tl) {
# Hot-patches for language codes
_sl = sl; _tl = tl
- if (_sl == "bs") _sl = "bs-Latn" # 'bs' is not recognized as valid code
if (_sl == "zh") _sl = "zh-CHS" # still old format
if (_sl == "zh-CN") _sl = "zh-CHS"
if (_sl == "zh-TW") _sl = "zh-CHT"
- if (_tl == "bs") _tl = "bs-Latn"
if (_tl == "zh") _tl = "zh-CHS"
if (_tl == "zh-CN") _tl = "zh-CHS"
if (_tl == "zh-TW") _tl = "zh-CHT"
@@ -151,7 +172,7 @@ function bingPostRequestUrl(text, sl, tl, hl, type) {
#else if (type == "transliterate")
# return HttpPathPrefix "/ttransliteratev3"
else # type == "translate"
- return HttpPathPrefix "/ttranslatev3"
+ return HttpPathPrefix "/ttranslatev3" sprintf("?IG=%s&IID=%s", IG, IID)
}
function bingPostRequestContentType(text, sl, tl, hl, type) {
@@ -168,7 +189,7 @@ function bingPostRequestBody(text, sl, tl, hl, type) {
#else if (type == "transliterate")
# return "&text=" quote(text) "&language=" sl "&toScript=" "latn"
else # type == "translate"
- return "&text=" quote(text) "&fromLang=" sl "&to=" tl
+ return "&text=" quote(text) "&fromLang=" sl "&to=" tl BingTokenKey
}
# Get the translation of a string.
@@ -199,19 +220,27 @@ function bingTranslate(text, sl, tl, hl,
_tl = getCode(tl); if (!_tl) _tl = tl
_hl = getCode(hl); if (!_hl) _hl = hl
- #bingSetIG() # set IG (no longer needed)
+ bingSetup()
# Hot-patches for Bing's own translator language codes
- # See:
+ # See:
if (_sl == "auto") _sl = "auto-detect"
- if (_sl == "bs") _sl = "bs-Latn" # 'bs' is not recognized as valid code
+ if (_sl == "tl") _sl = "fil" # Bing uses 'fil' for Filipino
+ if (_sl == "hmn") _sl = "mww" # Bing uses 'mww' for Hmong Daw
+ if (_sl == "ku") _sl = "kmr" # Bing uses 'kmr' for Northern Kurdish
+ else if (_sl == "ckb") _sl = "ku" # and 'ku' for Central Kurdish
+ if (_sl == "mn") _sl = "mn-Cyrl" # Bing uses 'mn-Cyrl' for Mongolian (Cyrillic)
if (_sl == "no") _sl = "nb" # Bing uses Norwegian Bokmål
# Bing uses 'pt' or 'pt-br' for Brazilian Portuguese, 'pt-pt' for European Portuguese
if (_sl == "pt-BR") _sl = "pt" # just pt-br
else if (_sl == "pt-PT") _sl = "pt" # FIXME: support pt-pt
if (_sl == "zh-CN") _sl = "zh-Hans"
if (_sl == "zh-TW") _sl = "zh-Hant"
- if (_tl == "bs") _tl = "bs-Latn"
+ if (_tl == "tl") _tl = "fil"
+ if (_tl == "hmn") _tl = "mww"
+ if (_tl == "ku") _tl = "kmr"
+ else if (_tl == "ckb") _tl = "ku"
+ if (_tl == "mn") _tl = "mn-Cyrl"
if (_tl == "no") _tl = "nb"
if (_tl == "pt-BR") _tl = "pt"
else if (_tl == "pt-PT") _tl = "pt-pt"
@@ -247,6 +276,12 @@ function bingTranslate(text, sl, tl, hl,
return
}
+ if (ast[0 SUBSEP "statusCode"] == "400") {
+ e("[ERROR] " ucfirst(Option["engine"]) " does not support the specified language(s)")
+ ExitCode = 1
+ return
+ }
+
translation = unparameterize(ast[0 SUBSEP 0 SUBSEP "translations" SUBSEP 0 SUBSEP "text"])
returnIl[0] = il = _sl == "auto-detect" ?
@@ -254,7 +289,7 @@ function bingTranslate(text, sl, tl, hl,
if (Option["verbose"] < -1)
return il
if (Option["verbose"] < 0)
- return getList(il)
+ return getLanguage(il)
# Transliteration
wShowTranslationPhonetics = Option["show-translation-phonetics"]
diff --git a/include/Translators/GoogleTranslate.awk b/include/Translators/GoogleTranslate.awk
index 9ea8025e..802eefc2 100644
--- a/include/Translators/GoogleTranslate.awk
+++ b/include/Translators/GoogleTranslate.awk
@@ -156,7 +156,7 @@ function googleTranslate(text, sl, tl, hl,
# 7 - autocorrection
if (i ~ "^0" SUBSEP "7" SUBSEP "5$") {
- if (ast[i] == "true")
+ if (!Option["no-autocorrect"] && ast[i] == "true")
w("Showing translation for: (use -no-auto to disable autocorrect)")
else
w("Did you mean: " \
@@ -209,7 +209,7 @@ function googleTranslate(text, sl, tl, hl,
if (Option["verbose"] < -1)
return il
else if (Option["verbose"] < 0)
- return getList(il)
+ return getLanguage(il)
# Generate output
if (!isVerbose) {
@@ -284,9 +284,9 @@ function googleTranslate(text, sl, tl, hl,
# Display: prompt message (Definitions of ...)
if (r) r = r RS
r = r m("-- display prompt message (Definitions of ...)")
- if (isRTL(hl)) # home language is R-to-L
+ if (isRTL(hl)) # host language is R-to-L
r = r prettify("prompt-message", s(showDefinitionsOf(hl, join(original, " "))))
- else { # home language is L-to-R
+ else { # host language is L-to-R
split(showDefinitionsOf(hl, "\0%s\0"), group, "\0")
for (i = 1; i <= length(group); i++) {
if (group[i] == "%s")
@@ -299,9 +299,9 @@ function googleTranslate(text, sl, tl, hl,
# Display: prompt message (Translations of ...)
if (r) r = r RS
r = r m("-- display prompt message (Translations of ...)")
- if (isRTL(hl)) # home language is R-to-L
+ if (isRTL(hl)) # host language is R-to-L
r = r prettify("prompt-message", s(showTranslationsOf(hl, join(original, " "))))
- else { # home language is L-to-R
+ else { # host language is L-to-R
split(showTranslationsOf(hl, "\0%s\0"), group, "\0")
for (i = 1; i <= length(group); i++) {
if (group[i] == "%s")
diff --git a/include/Translators/YandexTranslate.awk b/include/Translators/YandexTranslate.awk
index 9b149041..03b6f3bc 100644
--- a/include/Translators/YandexTranslate.awk
+++ b/include/Translators/YandexTranslate.awk
@@ -5,21 +5,15 @@
# Last Updated: 11 Aug 2018
BEGIN { provides("yandex") }
-function genSID( content, group, temp) {
- content = curl("http://translate.yandex.com")
-
- match(content, /SID:[[:space:]]*'([^']+)'/, group)
- if (group[1]) {
- split(group[1], temp, ".")
- SID = reverse(temp[1]) "." reverse(temp[2]) "." reverse(temp[3])
- } else {
- e("[ERROR] Oops! Something went wrong and I can't translate it for you :(")
- exit 1
- }
+function genUcid() {
+ "uuidgen" | getline uuid;
+ close("uuidgen");
+ gsub("-", "", uuid);
+ ucid = tolower(uuid)
}
function yandexInit() {
- genSID() # generate a one-time key
+ genUcid() # generate a one-time key
YandexWebTranslate = "z5h64q92x9.net" # host for web translation
HttpProtocol = "http://"
@@ -27,19 +21,28 @@ function yandexInit() {
HttpPort = 80
}
-function yandexRequestUrl(text, sl, tl, hl, group) {
+function yandexPostRequestUrl(text, sl, tl, hl, group) {
# Quick hack: Yandex doesn't support digraphia code (yet)
split(sl, group, "-"); sl = group[1]
split(tl, group, "-"); tl = group[1]
- return HttpPathPrefix "/api/v1/tr.json/translate?" \
- "id=" SID "-0-0&srv=tr-text" \
- "&text=" preprocess(text) "&lang=" (sl == "auto" ? tl : sl "-" tl)
+ return HttpPathPrefix "/api/v1/tr.json/translate" \
+ "?ucid=" ucid \
+ "&srv=android" \
+ "&text=" preprocess(text) \
+ "&lang=" (sl == "auto" ? tl : sl "-" tl)
}
function yandexPostRequestBody(text, sl, tl, hl, type) {
- # type == "translit"
- return "text=" quote(text) "&lang=" sl
+ return ""
+}
+
+function yandexPostRequestContentType(text, sl, tl, hl, type) {
+ return "application/x-www-form-urlencoded"
+}
+
+function yandexPostRequestUserAgent(text, sl, tl, hl, type) {
+ return ""
}
function yandexGetDictionaryResponse(text, sl, tl, hl, content, header, isBody, url) {
@@ -131,7 +134,7 @@ function yandexTranslate(text, sl, tl, hl,
_tl = getCode(tl); if (!_tl) _tl = tl
_hl = getCode(hl); if (!_hl) _hl = hl
- content = getResponse(text, _sl, _tl, _hl)
+ content = postResponse(text, _sl, _tl, _hl)
if (Option["dump"])
return content
tokenize(tokens, content)
@@ -156,8 +159,7 @@ function yandexTranslate(text, sl, tl, hl,
# Transliteration
wShowTranslationPhonetics = Option["show-translation-phonetics"]
if (wShowTranslationPhonetics && _tl != "emj") {
- split(_tl, group, "-")
- data = yandexPostRequestBody(translation, group[1], group[1], _hl, "translit")
+ data = "text=" text "&lang=" tl
content = curlPost("https://translate.yandex.net/translit/translit", data)
phonetics = (content ~ /not supported$/) ? "" : unparameterize(content)
}
@@ -167,7 +169,7 @@ function yandexTranslate(text, sl, tl, hl,
if (Option["verbose"] < -1)
return il
else if (Option["verbose"] < 0)
- return getList(il)
+ return getLanguage(il)
# Generate output
if (!isVerbose) {
@@ -188,8 +190,7 @@ function yandexTranslate(text, sl, tl, hl,
# Transliteration (original)
wShowOriginalPhonetics = Option["show-original-phonetics"]
if (wShowTranslationPhonetics && il != "emj") {
- split(il, group, "-")
- data = yandexPostRequestBody(text, group[1], group[1], _hl, "translit")
+ data = "text=" text "&lang=" sl
content = curlPost("https://translate.yandex.net/translit/translit", data)
oPhonetics = (content ~ /not supported$/) ? "" : unparameterize(content)
}
diff --git a/include/Translators/_.awk b/include/Translators/_.awk
index 7b092b39..12659f7f 100644
--- a/include/Translators/_.awk
+++ b/include/Translators/_.awk
@@ -3,3 +3,4 @@
@include "include/Translators/YandexTranslate.awk"
@include "include/Translators/Apertium.awk"
@include "include/Translators/SpellChecker.awk"
+@include "include/Translators/Auto.awk"
diff --git a/include/Utils.awk b/include/Utils.awk
index e9dc62b5..7d0c3f3f 100644
--- a/include/Utils.awk
+++ b/include/Utils.awk
@@ -23,6 +23,9 @@ function initBiDiTerm() {
BiDiTerm = "mlterm"
else if (ENVIRON["KONSOLE_VERSION"])
BiDiTerm = "konsole"
+ else if (ENVIRON["VTE_VERSION"])
+ if (int(ENVIRON["VTE_VERSION"]) >= 5703)
+ BiDiTerm = "vte"
}
# Detect external bidirectional algorithm utility (fribidi);
@@ -78,7 +81,7 @@ function newerVersion(ver1, ver2, i, group1, group2) {
return 0
}
-# Fork a rlwrap process as the wrapper. Return non-zero if failed,
+# Fork an rlwrap process as the wrapper. Return non-zero if failed,
function rlwrapMe( i, command) {
initRlwrap()
@@ -88,10 +91,10 @@ function rlwrapMe( i, command) {
}
if (ENVIRON["TRANS_ENTRY"]) {
- command = Rlwrap " " ENVIRON["TRANS_ENTRY"] " " \
+ command = Rlwrap " -C trans " ENVIRON["TRANS_ENTRY"] " " \
parameterize("-no-rlwrap") # never fork rlwrap again!
} else if (fileExists(ENVIRON["TRANS_DIR"] "/" EntryScript)) {
- command = Rlwrap " sh " \
+ command = Rlwrap " -C trans " " sh " \
parameterize(ENVIRON["TRANS_DIR"] "/" EntryScript) \
" - " parameterize("-no-rlwrap") # never fork rlwrap again!
} else {
diff --git a/man/trans.1 b/man/trans.1
index cf1f5787..6172db88 100644
--- a/man/trans.1
+++ b/man/trans.1
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 2.5
.\"
-.TH "TRANS" "1" "2020\-05\-11" "0.9.6.12" ""
+.TH "TRANS" "1" "2023\-02\-08" "0.9.7.1" ""
.hy
.SH NAME
.PP
@@ -30,7 +30,8 @@ Print version and exit.
.TP
.B \f[B]\-H\f[R], \f[B]\-help\f[R]
Print help message and exit.
-\f[B]\-M\f[R], \f[B]\-man\f[R]
+.TP
+.B \f[B]\-M\f[R], \f[B]\-man\f[R]
Show man page and exit.
.TP
.B \f[B]\-T\f[R], \f[B]\-reference\f[R]
@@ -42,21 +43,34 @@ language itself).
Print reference table of all supported languages and codes, and exit.
Names of languages are displayed in English.
.TP
-.B \f[B]\-L\f[R] \f[I]CODES\f[R], \f[B]\-list\f[R] \f[I]CODES\f[R]
+.B \f[B]\-S\f[R], \f[B]\-list\-engines\f[R]
+List available translation engines and exit.
+.TP
+.B \f[B]\-list\-languages\f[R]
+List all supported languages (in endonyms) and exit.
+.TP
+.B \f[B]\-list\-languages\-english\f[R]
+List all supported languages (in English names) and exit.
+.TP
+.B \f[B]\-list\-codes\f[R]
+List all supported codes and exit.
+.TP
+.B \f[B]\-list\-all\f[R]
+List all supported languages (endonyms and English names) and codes, and
+exit.
+.TP
+.B \f[B]\-L\f[R] \f[I]CODES\f[R], \f[B]\-linguist\f[R] \f[I]CODES\f[R]
Print details of languages and exit.
When specifying two or more language codes, concatenate them by plus
sign \[dq]+\[dq].
.TP
-.B \f[B]\-S\f[R], \f[B]\-list\-engines\f[R]
-List available translation engines and exit.
-.TP
.B \f[B]\-U\f[R], \f[B]\-upgrade\f[R]
Check for upgrade of this program.
.SS Translator options
.TP
.B \f[B]\-e\f[R] \f[I]ENGINE\f[R], \f[B]\-engine\f[R] \f[I]ENGINE\f[R]
Specify the translation engine to use.
-(default: google)
+(default: auto)
.SS Display options
.TP
.B \f[B]\-verbose\f[R]
@@ -308,7 +322,7 @@ output.
.RE
.SS Language preference options
.TP
-.B \f[B]\-l\f[R] \f[I]CODE\f[R], \f[B]\-hl\f[R] \f[I]CODE\f[R], \f[B]\-lang\f[R] \f[I]CODE\f[R]
+.B \f[B]\-hl\f[R] \f[I]CODE\f[R], \f[B]\-host\f[R] \f[I]CODE\f[R]
Specify your home language (the language you would like to see for
displaying prompt messages in the translation).
.RS
@@ -322,7 +336,7 @@ This option is optional.
When its setting is omitted, English will be used.
.PP
This option overrides the setting of environment variables
-$\f[B]LC_ALL\f[R], $\f[B]LANG\f[R], and $\f[B]HOME_LANG\f[R].
+$\f[B]LC_ALL\f[R], $\f[B]LANG\f[R], and $\f[B]HOST_LANG\f[R].
.RE
.TP
.B \f[B]\-s\f[R] \f[I]CODES\f[R], \f[B]\-sl\f[R] \f[I]CODES\f[R], \f[B]\-source\f[R] \f[I]CODES\f[R], \f[B]\-from\f[R] \f[I]CODES\f[R]
@@ -410,8 +424,8 @@ Equivalent to option setting \f[B]\-proxy\f[R].
.B \f[B]USER_AGENT\f[R]
Equivalent to option setting \f[B]\-user\-agent\f[R].
.TP
-.B \f[B]HOME_LANG\f[R]
-Equivalent to option setting \f[B]\-lang\f[R].
+.B \f[B]HOST_LANG\f[R]
+Equivalent to option setting \f[B]\-host\f[R].
.TP
.B \f[B]SOURCE_LANG\f[R]
Equivalent to option setting \f[B]\-source\f[R].
diff --git a/man/trans.1.md b/man/trans.1.md
index 663f20c5..847d64e6 100644
--- a/man/trans.1.md
+++ b/man/trans.1.md
@@ -1,6 +1,6 @@
-% TRANS(1) 0.9.6.12
+% TRANS(1) 0.9.7.1
% Mort Yao
-% 2020-05-11
+% 2023-02-08
# NAME
@@ -27,6 +27,7 @@ If neither *TEXT* nor the input file is specified by command-line arguments, the
**-H**, **-help**
: Print help message and exit.
+
**-M**, **-man**
: Show man page and exit.
@@ -36,19 +37,31 @@ If neither *TEXT* nor the input file is specified by command-line arguments, the
**-R**, **-reference-english**
: Print reference table of all supported languages and codes, and exit. Names of languages are displayed in English.
-**-L** *CODES*, **-list** *CODES*
-: Print details of languages and exit. When specifying two or more language codes, concatenate them by plus sign "+".
-
**-S**, **-list-engines**
: List available translation engines and exit.
+**-list-languages**
+: List all supported languages (in endonyms) and exit.
+
+**-list-languages-english**
+: List all supported languages (in English names) and exit.
+
+**-list-codes**
+: List all supported codes and exit.
+
+**-list-all**
+: List all supported languages (endonyms and English names) and codes, and exit.
+
+**-L** *CODES*, **-linguist** *CODES*
+: Print details of languages and exit. When specifying two or more language codes, concatenate them by plus sign "+".
+
**-U**, **-upgrade**
: Check for upgrade of this program.
## Translator options
**-e** *ENGINE*, **-engine** *ENGINE*
-: Specify the translation engine to use. (default: google)
+: Specify the translation engine to use. (default: auto)
## Display options
@@ -237,14 +250,14 @@ If neither *TEXT* nor the input file is specified by command-line arguments, the
## Language preference options
-**-l** *CODE*, **-hl** *CODE*, **-lang** *CODE*
+**-hl** *CODE*, **-host** *CODE*
: Specify your home language (the language you would like to see for displaying prompt messages in the translation).
This option affects only the display in verbose mode (anything other than source language and target language will be displayed in your home language). This option has no effect in brief mode.
This option is optional. When its setting is omitted, English will be used.
- This option overrides the setting of environment variables $**LC_ALL**, $**LANG**, and $**HOME_LANG**.
+ This option overrides the setting of environment variables $**LC_ALL**, $**LANG**, and $**HOST_LANG**.
**-s** *CODES*, **-sl** *CODES*, **-source** *CODES*, **-from** *CODES*
: Specify the source language(s) (the language(s) of original text). When specifying two or more language codes, concatenate them by plus sign "+".
@@ -312,8 +325,8 @@ If neither *TEXT* nor the input file is specified by command-line arguments, the
**USER_AGENT**
: Equivalent to option setting **-user-agent**.
-**HOME_LANG**
-: Equivalent to option setting **-lang**.
+**HOST_LANG**
+: Equivalent to option setting **-host**.
**SOURCE_LANG**
: Equivalent to option setting **-source**.
diff --git a/man/trans.1.template.md b/man/trans.1.template.md
index 3cace144..1e378f20 100644
--- a/man/trans.1.template.md
+++ b/man/trans.1.template.md
@@ -27,6 +27,7 @@ If neither *TEXT* nor the input file is specified by command-line arguments, the
**-H**, **-help**
: Print help message and exit.
+
**-M**, **-man**
: Show man page and exit.
@@ -36,19 +37,31 @@ If neither *TEXT* nor the input file is specified by command-line arguments, the
**-R**, **-reference-english**
: Print reference table of all supported languages and codes, and exit. Names of languages are displayed in English.
-**-L** *CODES*, **-list** *CODES*
-: Print details of languages and exit. When specifying two or more language codes, concatenate them by plus sign "+".
-
**-S**, **-list-engines**
: List available translation engines and exit.
+**-list-languages**
+: List all supported languages (in endonyms) and exit.
+
+**-list-languages-english**
+: List all supported languages (in English names) and exit.
+
+**-list-codes**
+: List all supported codes and exit.
+
+**-list-all**
+: List all supported languages (endonyms and English names) and codes, and exit.
+
+**-L** *CODES*, **-linguist** *CODES*
+: Print details of languages and exit. When specifying two or more language codes, concatenate them by plus sign "+".
+
**-U**, **-upgrade**
: Check for upgrade of this program.
## Translator options
**-e** *ENGINE*, **-engine** *ENGINE*
-: Specify the translation engine to use. (default: google)
+: Specify the translation engine to use. (default: auto)
## Display options
@@ -237,14 +250,14 @@ If neither *TEXT* nor the input file is specified by command-line arguments, the
## Language preference options
-**-l** *CODE*, **-hl** *CODE*, **-lang** *CODE*
+**-hl** *CODE*, **-host** *CODE*
: Specify your home language (the language you would like to see for displaying prompt messages in the translation).
This option affects only the display in verbose mode (anything other than source language and target language will be displayed in your home language). This option has no effect in brief mode.
This option is optional. When its setting is omitted, English will be used.
- This option overrides the setting of environment variables $**LC_ALL**, $**LANG**, and $**HOME_LANG**.
+ This option overrides the setting of environment variables $**LC_ALL**, $**LANG**, and $**HOST_LANG**.
**-s** *CODES*, **-sl** *CODES*, **-source** *CODES*, **-from** *CODES*
: Specify the source language(s) (the language(s) of original text). When specifying two or more language codes, concatenate them by plus sign "+".
@@ -312,8 +325,8 @@ If neither *TEXT* nor the input file is specified by command-line arguments, the
**USER_AGENT**
: Equivalent to option setting **-user-agent**.
-**HOME_LANG**
-: Equivalent to option setting **-lang**.
+**HOST_LANG**
+: Equivalent to option setting **-host**.
**SOURCE_LANG**
: Equivalent to option setting **-source**.
diff --git a/metainfo.awk b/metainfo.awk
index 85482fb5..38ccec93 100644
--- a/metainfo.awk
+++ b/metainfo.awk
@@ -1,8 +1,8 @@
BEGIN {
Name = "Translate Shell"
Description = "Command-line translator using Google Translate, Bing Translator, Yandex.Translate, etc."
- Version = "0.9.6.12"
- ReleaseDate = "2020-05-11"
+ Version = "0.9.7.1"
+ ReleaseDate = "2023-02-08"
Command = "trans"
EntryPoint = "translate.awk"
EntryScript = "translate"
diff --git a/test/Test.awk b/test/Test.awk
index d6139989..66265525 100644
--- a/test/Test.awk
+++ b/test/Test.awk
@@ -1,4 +1,4 @@
@include "test/TestCommons"
@include "test/TestUtils"
@include "test/TestParser"
-@include "test/TestLanguages"
+@include "test/TestLanguageHelper"
diff --git a/test/TestLanguages.awk b/test/TestLanguageHelper.awk
similarity index 79%
rename from test/TestLanguages.awk
rename to test/TestLanguageHelper.awk
index c77d3be2..b81f733b 100644
--- a/test/TestLanguages.awk
+++ b/test/TestLanguageHelper.awk
@@ -1,7 +1,8 @@
-@include "include/Languages"
+@include "include/LanguageData"
+@include "include/LanguageHelper"
BEGIN {
- START_TEST("Languages.awk")
+ START_TEST("LanguageHelper.awk")
T("getCode()", 5)
{
diff --git a/translate b/translate
index da4adc3f..dafe3592 100755
--- a/translate
+++ b/translate
@@ -4,7 +4,8 @@ gawk \
-i "${TRANS_DIR}/metainfo.awk" \
-i "${TRANS_DIR}/include/Commons.awk" \
-i "${TRANS_DIR}/include/Utils.awk" \
--i "${TRANS_DIR}/include/Languages.awk" \
+-i "${TRANS_DIR}/include/LanguageData.awk" \
+-i "${TRANS_DIR}/include/LanguageHelper.awk" \
-i "${TRANS_DIR}/include/Help.awk" \
-i "${TRANS_DIR}/include/Parser.awk" \
-i "${TRANS_DIR}/include/Theme.awk" \
@@ -15,6 +16,7 @@ gawk \
-i "${TRANS_DIR}/include/Translators/YandexTranslate.awk" \
-i "${TRANS_DIR}/include/Translators/Apertium.awk" \
-i "${TRANS_DIR}/include/Translators/SpellChecker.awk" \
+-i "${TRANS_DIR}/include/Translators/Auto.awk" \
-i "${TRANS_DIR}/include/Script.awk" \
-i "${TRANS_DIR}/include/REPL.awk" \
-f "${TRANS_DIR}/include/Main.awk" -- "$@"
diff --git a/translate-shell.bash b/translate-shell.bash
new file mode 100644
index 00000000..5c250103
--- /dev/null
+++ b/translate-shell.bash
@@ -0,0 +1,71 @@
+_complete_option() {
+ COMPREPLY=($(compgen -W "$(trans -help -no-ansi \
+ | awk '{\
+ for (i = 1; i <= NF; i++) {\
+ if (index($i, "-") == 1) {\
+ sub(/[,\.]$/, "", $i);\
+ print $i\
+ }\
+ }\
+ }')" -- "$cur"))
+}
+
+_complete_engine() {
+ COMPREPLY=($(compgen -W "$(trans -list-engines | awk '{ print gensub(/ |\*/, "", "g") }')" -- "$cur"))
+}
+
+_complete_language() {
+ local multiple="$1"
+ if [ "$multiple" ]; then
+ # Without this '+' and whatever precedes it, is removed from the command line.
+ COMP_WORDBREAKS+=+
+ cur="${cur//*+/}"
+ fi
+
+ COMPREPLY=($(compgen -W "$(trans -list-codes; trans -list-languages; trans -list-languages-english | sort)" -- "$cur"))
+}
+
+_has_language_delimiter() {
+ case "$cur" in
+ *[:=]*)
+ true
+ ;;
+ *)
+ false
+ ;;
+ esac
+}
+
+_translate() {
+ COMPREPLY=()
+ # Remove '+'s if they are added to this variable in _complete_language(). Maybe not needed?
+ COMP_WORDBREAKS="${COMP_WORDBREAKS//+/}"
+ cur="$(_get_cword)"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+
+ if [ "${prev:0:1}" = "-" ]; then
+ case "$prev" in
+ -s|-sl|-source|-from|-hl|-host)
+ _complete_language false
+ ;;
+ -t|-tl|-target|-to|-L|-linguist)
+ _complete_language true
+ ;;
+ -e|-engine)
+ _complete_engine
+ ;;
+ esac
+ elif [ "${cur:0:1}" = "-" ]; then
+ _complete_option
+ # Complete shorcut formatted languages.
+ elif _has_language_delimiter; then
+ # Remove first language and/or delimiter from cur.
+ cur="${cur/*[:=]/}"
+ _complete_language true
+ else
+ _complete_language true
+ fi
+
+ return 0
+} &&
+complete -F _translate default trans
diff --git a/translate.awk b/translate.awk
index df4fea19..a7305c74 100755
--- a/translate.awk
+++ b/translate.awk
@@ -5,7 +5,8 @@
@include "include/Commons.awk"
@include "include/Utils.awk"
-@include "include/Languages.awk"
+@include "include/LanguageData.awk"
+@include "include/LanguageHelper.awk"
@include "include/Help.awk"
@include "include/Parser.awk"
@include "include/Theme.awk"
diff --git a/wiki b/wiki
index 886345f3..eb31d6e9 160000
--- a/wiki
+++ b/wiki
@@ -1 +1 @@
-Subproject commit 886345f3029775bc18512649f5086e2233bec50a
+Subproject commit eb31d6e9cd017beba5e796bb3f27f68af440a534