Showing preview only (459K chars total). Download the full file or copy to clipboard to get everything.
Repository: soimort/translate-shell
Branch: develop
Commit: dc67af4e66ca
Files: 46
Total size: 440.9 KB
Directory structure:
gitextract_1wfg4je5/
├── .circleci/
│ └── config.yml
├── .github/
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── .gitmodules
├── .travis.yml
├── CONTRIBUTING.md
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── README.template.md
├── WAIVER
├── build.awk
├── google-translate-mode.el
├── include/
│ ├── Commons.awk
│ ├── Help.awk
│ ├── LanguageData.awk
│ ├── LanguageHelper.awk
│ ├── Main.awk
│ ├── Parser.awk
│ ├── REPL.awk
│ ├── Script.awk
│ ├── Theme.awk
│ ├── Translate.awk
│ ├── TranslatorInterface.awk
│ ├── Translators/
│ │ ├── Apertium.awk
│ │ ├── Auto.awk
│ │ ├── BingTranslator.awk
│ │ ├── GoogleTranslate.awk
│ │ ├── SpellChecker.awk
│ │ ├── YandexTranslate.awk
│ │ └── _.awk
│ └── Utils.awk
├── man/
│ ├── trans.1
│ ├── trans.1.md
│ └── trans.1.template.md
├── metainfo.awk
├── test/
│ ├── Test.awk
│ ├── TestCommons.awk
│ ├── TestLanguageHelper.awk
│ ├── TestParser.awk
│ └── TestUtils.awk
├── test.awk
├── translate
├── translate-shell.plugin.zsh
└── translate.awk
================================================
FILE CONTENTS
================================================
================================================
FILE: .circleci/config.yml
================================================
version: 2
jobs:
build:
environment:
LC_ALL: C.UTF-8
LANG: C.UTF-8
docker:
- image: cimg/base:2023.09
steps:
- checkout
- run:
name: Install Dependencies
command: |
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: |
make test
================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
on:
push:
branches:
- develop
- stable
pull_request:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install gawk curl rlwrap emacs
- name: Sanity check
run: |
make test
================================================
FILE: .gitignore
================================================
/_*
/build
/gh-pages
/registry
/wiki
*.emacs*
*.html
================================================
FILE: .gitmodules
================================================
[submodule "translate-shell.wiki"]
path = wiki
url = https://github.com/soimort/translate-shell.wiki.git
================================================
FILE: .travis.yml
================================================
os:
- linux
- osx
before_install: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository ppa:schot/gawk -y; fi
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -q; fi
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install gawk; fi
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install rlwrap; fi
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install emacs; fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gawk; fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install rlwrap; fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install emacs; fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install bash; fi
script: make check
================================================
FILE: CONTRIBUTING.md
================================================
## How to Report an Issue
1. For bugs and suggestions, please always **[report your issue on GitHub](https://github.com/soimort/translate-shell/issues)**.
2. For bugs, make sure you can reproduce on **the latest stable version** before reporting.
3. In your bug report, please include details such as:
* The exact command you entered, expected output and actual output
* The output of `trans -V` on your system
## How to Send a Pull Request
### Waiving Copyrights
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
Please review the **[AWK style guide](https://github.com/soimort/translate-shell/wiki/AWK-Style-Guide)**.
================================================
FILE: Dockerfile
================================================
FROM alpine:latest
MAINTAINER soimort
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk add bash gawk curl mplayer fribidi less hunspell wget \
&& wget git.io/trans \
&& chmod +x ./trans \
&& mv ./trans /usr/local/bin/
ENTRYPOINT ["trans"]
CMD ["--help"]
================================================
FILE: LICENSE
================================================
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>
================================================
FILE: Makefile
================================================
NAME = "translate-shell"
COMMAND = trans
BUILDDIR ?= build
MANDIR = man
TARGET ?= bash
PREFIX ?= /usr/local
.PHONY: default clean build release grip test check install uninstall
default: build
clean:
@gawk -f build.awk clean
build:
@gawk -f build.awk build -target=$(TARGET)
release:
@gawk -f build.awk build -target=$(TARGET) -type=release
grip:
@gawk -f build.awk readme && grip
test: build
@gawk -f test.awk
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' ]
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 &&\
echo "[OK] $(NAME) installed."
uninstall:
@rm $(DESTDIR)$(PREFIX)/bin/$(COMMAND) $(DESTDIR)$(PREFIX)/share/man/man1/$(COMMAND).1 &&\
echo "[OK] $(NAME) uninstalled."
================================================
FILE: README.md
================================================
# Translate Shell
[](https://www.soimort.org/translate-shell)
[](https://circleci.com/gh/soimort/translate-shell)
[](https://github.com/soimort/translate-shell/actions)
[](https://github.com/soimort/translate-shell/releases)
[](https://www.soimort.org/translate-shell/trans)
[](https://gitter.im/soimort/translate-shell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
**[Translate Shell](https://www.soimort.org/translate-shell)** (formerly _Google Translate CLI_) is a command-line translator powered by **[Google Translate](https://translate.google.com/)** (default), **[Bing Translator](https://www.bing.com/translator)**, **[Yandex.Translate](https://translate.yandex.com/)**, and **[Apertium](https://www.apertium.org/)**. It gives you easy access to one of these translation engines in your terminal:
```
$ trans 'Saluton, Mondo!'
Saluton, Mondo!
Hello, World!
Translations of Saluton, Mondo!
[ Esperanto -> English ]
Saluton ,
Hello,
Mondo !
World!
```
By default, translations with detailed explanations are shown. You can also translate the text briefly: (only the most relevant translation will be shown)
```
$ trans -brief 'Saluton, Mondo!'
Hello, World!
```
**Translate Shell** can also be used like an interactive shell; input the text to be translated line by line:
```
$ trans -shell -brief
> Rien ne réussit comme le succès.
Nothing succeeds like success.
> Was mich nicht umbringt, macht mich stärker.
What does not kill me makes me stronger.
> Юмор есть остроумие глубокого чувства.
Humor has a deep sense of wit.
> 學而不思則罔,思而不學則殆。
Learning without thought is labor lost, thought without learning is perilous.
> 幸福になるためには、人から愛されるのが一番の近道。
In order to be happy, the best way is to be loved by people.
```
## Prerequisites
### System Requirements
**Translate Shell** is known to work on many POSIX-compliant systems, including but not limited to:
* GNU/Linux
* macOS
* *BSD
* Android (through Termux)
* Windows (through WSL, Cygwin, or MSYS2)
### Dependencies
* **[GNU Awk](https://www.gnu.org/software/gawk/)** (**gawk**) **4.0 or later**
* This program relies heavily on GNU extensions of the [AWK language](http://en.wikipedia.org/wiki/AWK), which are non-portable for other AWK implementations (e.g. nawk).
* How to get gawk:
* 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.
### Recommended Dependencies
These dependencies are optional, but strongly recommended for full functionality:
* **[curl](http://curl.haxx.se/)** with **OpenSSL** support
* **[GNU FriBidi](http://fribidi.org/)**: _an implementation of the Unicode Bidirectional Algorithm (bidi)_
* required for displaying text in Right-to-Left scripts (e.g. Arabic, Hebrew)
* **[mplayer](http://www.mplayerhq.hu/)**, **[mpv](http://mpv.io/)**, **[mpg123](http://mpg123.org/)**, or **[eSpeak](http://espeak.sourceforge.net/)**
* required for the Text-to-Speech functionality
* **[less](http://www.greenwoodsoftware.com/less/)**, **[more](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/more.html)** or **[most](http://www.jedsoft.org/most/)**
* required for terminal paging
* **[rlwrap](http://utopia.knoware.nl/~hlub/uck/rlwrap/#rlwrap)**: *a GNU readline wrapper*
* required for readline-style editing and history in the interactive shell
* **[aspell](http://aspell.net/)** or **[hunspell](http://hunspell.github.io/)**
* required for spell checking
### Environment and Fonts
It is a must to have corresponding fonts for the language(s) / script(s) you wish to display in your terminal. See **[wiki: Writing Systems and Fonts](https://github.com/soimort/translate-shell/wiki/Writing-Systems-and-Fonts#unicode-fonts)** for more details on scripts and recommended Unicode fonts.
## Try It Out!
Start an interactive shell and translate anything you input into your native language: (in **bash** or **zsh**)
$ gawk -f <(curl -Ls --compressed https://git.io/translate) -- -shell
(in **fish**)
$ gawk -f (curl -Ls --compressed https://git.io/translate | psub) -- -shell
### Using Docker
To try out via [Docker](https://www.docker.com/), run:
$ docker pull soimort/translate-shell
Then you may start an interactive shell from the Docker image for translating:
$ docker run -it soimort/translate-shell -shell
## Installation
### Option #1. Direct Download
Download [the self-contained executable](http://git.io/trans) and place it into your path. It's everything you need.
$ wget git.io/trans
$ chmod +x ./trans
There is a [GPG signature](https://www.soimort.org/translate-shell/trans.sig).
### Option #2. From A Package Manager
#### Using your favorite package manager
See **[wiki: Distros](https://github.com/soimort/translate-shell/wiki/Distros)** on how to install from a specific package manager on your distro.
#### Using [Antigen](https://github.com/zsh-users/antigen) (for Zsh users)
Add the following line to your `.zshrc`:
antigen bundle soimort/translate-shell@develop
### Option #3. From Git
$ git clone https://github.com/soimort/translate-shell
$ cd translate-shell/
$ make
$ [sudo] make install
In case you have only zsh but not bash in your system, build with:
$ make TARGET=zsh
The default `PREFIX` of installation is `/usr/local`. To install the program to somewhere else (e.g. `/usr`, `~/.local`), use:
$ [sudo] make PREFIX=/usr install
## Getting Started by Examples
### Translate a Word
#### From any language to your language
Google Translate can identify the language of the source text automatically, and Translate Shell by default translates the source text into the language of your `locale`.
$ trans vorto
#### From any language to one or more specific languages
Translate a word into French:
$ trans :fr word
Translate a word into Chinese and Japanese: (use a plus sign "`+`" as the delimiter)
$ trans :zh+ja word
Alternatively, equals sign ("`=`") can be used in place of the colon ("`:`"). Note that in some shells (e.g. zsh), equals signs may be interpreted differently, therefore the argument specifying languages needs to be protected:
$ trans {=zh+ja} word
$ trans '=zh+ja' word
You can also use the `-target` (`-t`) option to specify the target language(s):
$ trans -t zh+ja word
With the `-t` option, the name of the language may also be used instead of the language code:
$ trans -t japanese word
$ trans -t 日本語 word
#### From a specific language
Google Translate may wrongly identify the source text as some other language than you expected:
$ trans 手紙
In that case, you need to specify its language explicitly:
$ trans ja: 手紙
$ trans zh: 手紙
You can also use the `-source` (`-s`) option to specify the source language:
$ trans -s ja 手紙
### Translate Multiple Words or a Phrase
Translate each word alone:
$ trans en:zh word processor
Put words into one argument, and translate them as a whole:
$ trans en:zh "word processor"
### Translate a Sentence
Translating a sentence is much the same like translating a phrase; you can just quote the sentence into one argument:
$ trans :zh "To-morrow, and to-morrow, and to-morrow,"
$ trans :zh 'To-morrow, and to-morrow, and to-morrow,'
It is also possible to translate multi-line sentences:
$ trans :zh "Creeps in this petty pace from day to day,
> To the last syllable of recorded time;
> And all our yesterdays have lighted fools
> The way to dusty death."
To avoid punctuation marks (e.g. "`!`") or other special characters being interpreted by the shell, use *single quotes*:
$ trans :zh 'Out, out, brief candle!'
There are some cases though, you may still want to use *double quotes*: (e.g. the sentence contains a single quotation mark "`'`")
$ trans :zh "Life's but a walking shadow, a poor player"
Alternatively, use the `-join-sentence` (`-j`) option to treat all arguments as one sentence so that quotes can be omitted:
$ trans -j :zh Life\'s but a walking shadow, a poor player
### Brief Mode
By default, Translate Shell displays translations in a verbose manner. If you prefer to see only the most relevant translation, there is a brief mode available using the `-brief` (`-b`) option:
$ trans -b :fr "Saluton, Mondo"
In brief mode, phonetic notation (if any) is not shown by default. To enable this, put an at sign "`@`" in front of the language code:
$ trans -b :@ja "Saluton, Mondo"
### Dictionary Mode
Google Translate can be used as a dictionary. When translating a word and the target language is the same as the source language, the dictionary entry of the word is shown:
$ trans :en word
To enable dictionary mode no matter whether the source language and the target language are identical, use the `-dictionary` (`-d`) option.
$ trans -d fr: mot
**Note:** Not every language supported by Google Translate has provided dictionary data. See **[wiki: Languages](https://github.com/soimort/translate-shell/wiki/Languages)** to find out which language(s) has dictionary support.
### Language Identification
Use the `-identify` (`-id`) option to identify the language of the text:
$ trans -id 言葉
### Text-to-Speech
Use the `-play` (`-p`) option to listen to the translation:
$ trans -b -p :ja "Saluton, Mondo"
Use the `-speak` (`-sp`) option to listen to the original text:
$ trans -sp "你好,世界"
### Terminal Paging
Sometimes the content of translation can be too much for display in one screen. Use the `-view` (`-v`) option to view the translation in a terminal pager such as `less` or `more`:
$ trans -d -v word
### Right-to-Left (RTL) Languages
[Right-to-Left (RTL) languages](http://en.wikipedia.org/wiki/Right-to-left) are well supported via [GNU FriBidi](http://fribidi.org/).
The program will automatically adjust the screen width for padding when displaying right-to-left languages. Alternatively, you may use the `-width` (`-w`) option to specify the screen width:
$ trans -b -w 40 :he "Saluton, Mondo"
See **[wiki: Languages](https://github.com/soimort/translate-shell/wiki/Languages)** to find out which language(s) uses a Right-to-Left writing system.
### Pipeline, Input and Output
If no source text is given in command-line arguments, the program will read from standard input, or from the file specified by the `-input` (`-i`) option:
$ echo "Saluton, Mondo" | trans -b :fr
$ trans -b -i input.txt :fr
Translations are written to standard output, or to the file specified by the `-output` (`-o`) option:
$ echo "Saluton, Mondo" | trans -b -o output.txt :fr
### Translate a File
Instead of using the `-input` option, a [file URI scheme](http://en.wikipedia.org/wiki/File_URI_scheme) (`file://` followed by the file name) can be used as a command-line argument:
$ trans :fr file://input.txt
**Note**: Brief mode is used when translating from file URI schemes.
### Translate a Web Page
To translate a web page, an http(s) URI scheme can be used as an argument:
$ trans :fr http://www.w3.org/
A browser session will open for viewing the translation (via Google Translate's web interface). To specify your web browser of choice, use the `-browser` option:
$ trans -browser firefox :fr http://www.w3.org/
### Language Details
Use the `-linguist` (`-L`) option to view details of one or more languages:
$ trans -L fr
$ trans -L de+en
Some basic information of the language will be displayed: its English name and endonym (language name in the language itself), language family, writing system, canonical Google Translate code and ISO 639-3 code.
### Interactive Translate Shell (REPL)
Start an interactive shell using the `-shell` (or `-interactive`, `-I`) option:
$ trans -shell
You may specify the source language and the target language(s) before starting an interactive shell:
$ trans -shell en:fr
You may also change these settings during an interactive session. See **[wiki: REPL](https://github.com/soimort/translate-shell/wiki/REPL)** for more advanced usage of the interactive Translate Shell.
## Usage
For more details on command-line options, see the man page **[trans(1)](https://www.soimort.org/translate-shell/trans.1.html)** or use `trans -M` in a terminal.
```
Usage: trans [OPTIONS] [SOURCES]:[TARGETS] [TEXT]...
Information options:
-V, -version
Print version and exit.
-H, -help
Print help message and exit.
-M, -man
Show man page and exit.
-T, -reference
Print reference table of languages (in endonyms) and codes, and exit.
-R, -reference-english
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.
Translator options:
-e ENGINE, -engine ENGINE
Specify the translation engine to use.
Display options:
-verbose
Verbose mode. (default)
-b, -brief
Brief mode.
-d, -dictionary
Dictionary mode.
-identify
Language identification.
-show-original Y/n
Show original text or not.
-show-original-phonetics Y/n
Show phonetic notation of original text or not.
-show-translation Y/n
Show translation or not.
-show-translation-phonetics Y/n
Show phonetic notation of translation or not.
-show-prompt-message Y/n
Show prompt message or not.
-show-languages Y/n
Show source and target languages or not.
-show-original-dictionary y/N
Show dictionary entry of original text or not.
-show-dictionary Y/n
Show dictionary entry of translation or not.
-show-alternatives Y/n
Show alternative translations or not.
-w NUM, -width NUM
Specify the screen width for padding.
-indent NUM
Specify the size of indent (number of spaces).
-theme FILENAME
Specify the theme to use.
-no-theme
Do not use any other theme than default.
-no-ansi
Do not use ANSI escape codes.
-no-autocorrect
Do not autocorrect. (if defaulted by the translation engine)
-no-bidi
Do not convert bidirectional texts.
-bidi
Always convert bidirectional texts.
-no-warn
Do not write warning messages to stderr.
-dump
Print raw API response instead.
Audio options:
-p, -play
Listen to the translation.
-speak
Listen to the original text.
-n VOICE, -narrator VOICE
Specify the narrator, and listen to the translation.
-player PROGRAM
Specify the audio player to use, and listen to the translation.
-no-play
Do not listen to the translation.
-no-translate
Do not translate anything when using -speak.
-download-audio
Download the audio to the current directory.
-download-audio-as FILENAME
Download the audio to the specified file.
Terminal paging and browsing options:
-v, -view
View the translation in a terminal pager.
-pager PROGRAM
Specify the terminal pager to use, and view the translation.
-no-view, -no-pager
Do not view the translation in a terminal pager.
-browser PROGRAM
Specify the web browser to use.
-no-browser
Do not open the web browser.
Networking options:
-x HOST:PORT, -proxy HOST:PORT
Use HTTP proxy on given port.
-u STRING, -user-agent STRING
Specify the User-Agent to identify as.
-4, -ipv4, -inet4-only
Connect only to IPv4 addresses.
-6, -ipv6, -inet6-only
Connect only to IPv6 addresses.
Interactive shell options:
-I, -interactive, -shell
Start an interactive shell.
-E, -emacs
Start the GNU Emacs front-end for an interactive shell.
-no-rlwrap
Do not invoke rlwrap when starting an interactive shell.
I/O options:
-i FILENAME, -input FILENAME
Specify the input file.
-o FILENAME, -output FILENAME
Specify the output file.
Language preference options:
-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
Specify the target language(s), joined by '+'.
Text preprocessing options:
-j, -join-sentence
Treat all arguments as one single sentence.
Other options:
-no-init
Do not load any initialization script.
See the man page trans(1) for more information.
```
## Code List
Use `trans -R` or `trans -T` to view the reference table in a terminal.
For more details on languages and corresponding codes, see **[wiki: Languages](https://github.com/soimort/translate-shell/wiki/Languages)**.
| Language | Code | Language | Code | Language | Code |
| :------: | :--: | :------: | :--: | :------: | :--: |
| **[Afrikaans](http://en.wikipedia.org/wiki/ISO_639:afr)** <br/> **Afrikaans** | **`af`** | **[Hebrew](http://en.wikipedia.org/wiki/ISO_639:heb)** <br/> **עִבְרִית** | **`he`** | **[Portuguese (Brazilian)](http://en.wikipedia.org/wiki/ISO_639:por)** <br/> **Português Brasileiro** | **`pt-BR`** |
| **[Albanian](http://en.wikipedia.org/wiki/ISO_639:sqi)** <br/> **Shqip** | **`sq`** | **[Hill Mari](http://en.wikipedia.org/wiki/ISO_639:mrj)** <br/> **Кырык мары** | **`mrj`** | **[Portuguese (European)](http://en.wikipedia.org/wiki/ISO_639:por)** <br/> **Português Europeu** | **`pt-PT`** |
| **[Amharic](http://en.wikipedia.org/wiki/ISO_639:amh)** <br/> **አማርኛ** | **`am`** | **[Hindi](http://en.wikipedia.org/wiki/ISO_639:hin)** <br/> **हिन्दी** | **`hi`** | **[Punjabi](http://en.wikipedia.org/wiki/ISO_639:pan)** <br/> **ਪੰਜਾਬੀ** | **`pa`** |
| **[Arabic](http://en.wikipedia.org/wiki/ISO_639:ara)** <br/> **العربية** | **`ar`** | **[Hmong](http://en.wikipedia.org/wiki/ISO_639:hmn)** <br/> **Hmoob** | **`hmn`** | **[Quechua](http://en.wikipedia.org/wiki/ISO_639:que)** <br/> **Runasimi** | **`qu`** |
| **[Armenian](http://en.wikipedia.org/wiki/ISO_639:hye)** <br/> **Հայերեն** | **`hy`** | **[Hungarian](http://en.wikipedia.org/wiki/ISO_639:hun)** <br/> **Magyar** | **`hu`** | **[Querétaro Otomi](http://en.wikipedia.org/wiki/ISO_639:otq)** <br/> **Hñąñho** | **`otq`** |
| **[Assamese](http://en.wikipedia.org/wiki/ISO_639:asm)** <br/> **অসমীয়া** | **`as`** | **[Icelandic](http://en.wikipedia.org/wiki/ISO_639:isl)** <br/> **Íslenska** | **`is`** | **[Romanian](http://en.wikipedia.org/wiki/ISO_639:ron)** <br/> **Română** | **`ro`** |
| **[Aymara](http://en.wikipedia.org/wiki/ISO_639:aym)** <br/> **Aymar aru** | **`ay`** | **[Igbo](http://en.wikipedia.org/wiki/ISO_639:ibo)** <br/> **Igbo** | **`ig`** | **[Romansh](http://en.wikipedia.org/wiki/ISO_639:roh)** <br/> **Rumantsch** | **`rm`** |
| **[Azerbaijani](http://en.wikipedia.org/wiki/ISO_639:aze)** <br/> **Azərbaycanca** | **`az`** | **[Ilocano](http://en.wikipedia.org/wiki/ISO_639:ilo)** <br/> **Ilokano** | **`ilo`** | **[Russian](http://en.wikipedia.org/wiki/ISO_639:rus)** <br/> **Русский** | **`ru`** |
| **[Bambara](http://en.wikipedia.org/wiki/ISO_639:bam)** <br/> **Bamanankan** | **`bm`** | **[Indonesian](http://en.wikipedia.org/wiki/ISO_639:ind)** <br/> **Bahasa Indonesia** | **`id`** | **[Samoan](http://en.wikipedia.org/wiki/ISO_639:smo)** <br/> **Gagana Sāmoa** | **`sm`** |
| **[Bashkir](http://en.wikipedia.org/wiki/ISO_639:bak)** <br/> **Башҡортса** | **`ba`** | **[Interlingue](http://en.wikipedia.org/wiki/ISO_639:ile)** <br/> **Interlingue** | **`ie`** | **[Sanskrit](http://en.wikipedia.org/wiki/ISO_639:san)** <br/> **संस्कृतम्** | **`sa`** |
| **[Basque](http://en.wikipedia.org/wiki/ISO_639:eus)** <br/> **Euskara** | **`eu`** | **[Inuinnaqtun](http://en.wikipedia.org/wiki/ISO_639:ikt)** <br/> **Inuinnaqtun** | **`ikt`** | **[Scots Gaelic](http://en.wikipedia.org/wiki/ISO_639:gla)** <br/> **Gàidhlig** | **`gd`** |
| **[Belarusian](http://en.wikipedia.org/wiki/ISO_639:bel)** <br/> **беларуская** | **`be`** | **[Inuktitut](http://en.wikipedia.org/wiki/ISO_639:iku)** <br/> **ᐃᓄᒃᑎᑐᑦ** | **`iu`** | **[Sepedi](http://en.wikipedia.org/wiki/ISO_639:nso)** <br/> **Sepedi** | **`nso`** |
| **[Bengali](http://en.wikipedia.org/wiki/ISO_639:ben)** <br/> **বাংলা** | **`bn`** | **[Inuktitut (Latin)](http://en.wikipedia.org/wiki/ISO_639:iku)** <br/> **Inuktitut** | **`iu-Latn`** | **[Serbian (Cyrillic)](http://en.wikipedia.org/wiki/ISO_639:srp)** <br/> **Српски** | **`sr-Cyrl`** |
| **[Bhojpuri](http://en.wikipedia.org/wiki/ISO_639:bho)** <br/> **भोजपुरी** | **`bho`** | **[Irish](http://en.wikipedia.org/wiki/ISO_639:gle)** <br/> **Gaeilge** | **`ga`** | **[Serbian (Latin)](http://en.wikipedia.org/wiki/ISO_639:srp)** <br/> **Srpski** | **`sr-Latn`** |
| **[Bosnian](http://en.wikipedia.org/wiki/ISO_639:bos)** <br/> **Bosanski** | **`bs`** | **[Italian](http://en.wikipedia.org/wiki/ISO_639:ita)** <br/> **Italiano** | **`it`** | **[Sesotho](http://en.wikipedia.org/wiki/ISO_639:sot)** <br/> **Sesotho** | **`st`** |
| **[Breton](http://en.wikipedia.org/wiki/ISO_639:bre)** <br/> **Brezhoneg** | **`br`** | **[Japanese](http://en.wikipedia.org/wiki/ISO_639:jpn)** <br/> **日本語** | **`ja`** | **[Setswana](http://en.wikipedia.org/wiki/ISO_639:tsn)** <br/> **Setswana** | **`tn`** |
| **[Bulgarian](http://en.wikipedia.org/wiki/ISO_639:bul)** <br/> **български** | **`bg`** | **[Javanese](http://en.wikipedia.org/wiki/ISO_639:jav)** <br/> **Basa Jawa** | **`jv`** | **[Shona](http://en.wikipedia.org/wiki/ISO_639:sna)** <br/> **chiShona** | **`sn`** |
| **[Cantonese](http://en.wikipedia.org/wiki/ISO_639:yue)** <br/> **粵語** | **`yue`** | **[Kannada](http://en.wikipedia.org/wiki/ISO_639:kan)** <br/> **ಕನ್ನಡ** | **`kn`** | **[Sindhi](http://en.wikipedia.org/wiki/ISO_639:snd)** <br/> **سنڌي** | **`sd`** |
| **[Catalan](http://en.wikipedia.org/wiki/ISO_639:cat)** <br/> **Català** | **`ca`** | **[Kazakh](http://en.wikipedia.org/wiki/ISO_639:kaz)** <br/> **Қазақ тілі** | **`kk`** | **[Sinhala](http://en.wikipedia.org/wiki/ISO_639:sin)** <br/> **සිංහල** | **`si`** |
| **[Cebuano](http://en.wikipedia.org/wiki/ISO_639:ceb)** <br/> **Cebuano** | **`ceb`** | **[Khmer](http://en.wikipedia.org/wiki/ISO_639:khm)** <br/> **ភាសាខ្មែរ** | **`km`** | **[Slovak](http://en.wikipedia.org/wiki/ISO_639:slk)** <br/> **Slovenčina** | **`sk`** |
| **[Cherokee](http://en.wikipedia.org/wiki/ISO_639:chr)** <br/> **ᏣᎳᎩ** | **`chr`** | **[Kinyarwanda](http://en.wikipedia.org/wiki/ISO_639:kin)** <br/> **Ikinyarwanda** | **`rw`** | **[Slovenian](http://en.wikipedia.org/wiki/ISO_639:slv)** <br/> **Slovenščina** | **`sl`** |
| **[Chichewa](http://en.wikipedia.org/wiki/ISO_639:nya)** <br/> **Nyanja** | **`ny`** | **[Klingon](http://en.wikipedia.org/wiki/ISO_639:tlh)** <br/> **tlhIngan Hol** | **`tlh-Latn`** | **[Somali](http://en.wikipedia.org/wiki/ISO_639:som)** <br/> **Soomaali** | **`so`** |
| **[Chinese (Literary)](http://en.wikipedia.org/wiki/ISO_639:lzh)** <br/> **文言** | **`lzh`** | **[Konkani](http://en.wikipedia.org/wiki/ISO_639:gom)** <br/> **कोंकणी** | **`gom`** | **[Spanish](http://en.wikipedia.org/wiki/ISO_639:spa)** <br/> **Español** | **`es`** |
| **[Chinese (Simplified)](http://en.wikipedia.org/wiki/ISO_639:zho)** <br/> **简体中文** | **`zh-CN`** | **[Korean](http://en.wikipedia.org/wiki/ISO_639:kor)** <br/> **한국어** | **`ko`** | **[Sundanese](http://en.wikipedia.org/wiki/ISO_639:sun)** <br/> **Basa Sunda** | **`su`** |
| **[Chinese (Traditional)](http://en.wikipedia.org/wiki/ISO_639:zho)** <br/> **繁體中文** | **`zh-TW`** | **[Krio](http://en.wikipedia.org/wiki/ISO_639:kri)** <br/> **Krio** | **`kri`** | **[Swahili](http://en.wikipedia.org/wiki/ISO_639:swa)** <br/> **Kiswahili** | **`sw`** |
| **[Chuvash](http://en.wikipedia.org/wiki/ISO_639:chv)** <br/> **Чӑвашла** | **`cv`** | **[Kurdish (Central)](http://en.wikipedia.org/wiki/ISO_639:ckb)** <br/> **سۆرانی** | **`ckb`** | **[Swedish](http://en.wikipedia.org/wiki/ISO_639:swe)** <br/> **Svenska** | **`sv`** |
| **[Corsican](http://en.wikipedia.org/wiki/ISO_639:cos)** <br/> **Corsu** | **`co`** | **[Kurdish (Northern)](http://en.wikipedia.org/wiki/ISO_639:kmr)** <br/> **Kurmancî** | **`ku`** | **[Tahitian](http://en.wikipedia.org/wiki/ISO_639:tah)** <br/> **Reo Tahiti** | **`ty`** |
| **[Croatian](http://en.wikipedia.org/wiki/ISO_639:hrv)** <br/> **Hrvatski** | **`hr`** | **[Kyrgyz](http://en.wikipedia.org/wiki/ISO_639:kir)** <br/> **Кыргызча** | **`ky`** | **[Tajik](http://en.wikipedia.org/wiki/ISO_639:tgk)** <br/> **Тоҷикӣ** | **`tg`** |
| **[Czech](http://en.wikipedia.org/wiki/ISO_639:ces)** <br/> **Čeština** | **`cs`** | **[Lao](http://en.wikipedia.org/wiki/ISO_639:lao)** <br/> **ລາວ** | **`lo`** | **[Tamil](http://en.wikipedia.org/wiki/ISO_639:tam)** <br/> **தமிழ்** | **`ta`** |
| **[Danish](http://en.wikipedia.org/wiki/ISO_639:dan)** <br/> **Dansk** | **`da`** | **[Latin](http://en.wikipedia.org/wiki/ISO_639:lat)** <br/> **Latina** | **`la`** | **[Tatar](http://en.wikipedia.org/wiki/ISO_639:tat)** <br/> **татарча** | **`tt`** |
| **[Dari](http://en.wikipedia.org/wiki/ISO_639:prs)** <br/> **دری** | **`prs`** | **[Latvian](http://en.wikipedia.org/wiki/ISO_639:lav)** <br/> **Latviešu** | **`lv`** | **[Telugu](http://en.wikipedia.org/wiki/ISO_639:tel)** <br/> **తెలుగు** | **`te`** |
| **[Dhivehi](http://en.wikipedia.org/wiki/ISO_639:div)** <br/> **ދިވެހި** | **`dv`** | **[Lingala](http://en.wikipedia.org/wiki/ISO_639:lin)** <br/> **Lingála** | **`ln`** | **[Thai](http://en.wikipedia.org/wiki/ISO_639:tha)** <br/> **ไทย** | **`th`** |
| **[Dogri](http://en.wikipedia.org/wiki/ISO_639:doi)** <br/> **डोगरी** | **`doi`** | **[Lithuanian](http://en.wikipedia.org/wiki/ISO_639:lit)** <br/> **Lietuvių** | **`lt`** | **[Tibetan](http://en.wikipedia.org/wiki/ISO_639:bod)** <br/> **བོད་ཡིག** | **`bo`** |
| **[Dutch](http://en.wikipedia.org/wiki/ISO_639:nld)** <br/> **Nederlands** | **`nl`** | **[Luganda](http://en.wikipedia.org/wiki/ISO_639:lug)** <br/> **Luganda** | **`lg`** | **[Tigrinya](http://en.wikipedia.org/wiki/ISO_639:tir)** <br/> **ትግርኛ** | **`ti`** |
| **[Dzongkha](http://en.wikipedia.org/wiki/ISO_639:dzo)** <br/> **རྫོང་ཁ** | **`dz`** | **[Luxembourgish](http://en.wikipedia.org/wiki/ISO_639:ltz)** <br/> **Lëtzebuergesch** | **`lb`** | **[Tongan](http://en.wikipedia.org/wiki/ISO_639:ton)** <br/> **Lea faka-Tonga** | **`to`** |
| **[Eastern Mari](http://en.wikipedia.org/wiki/ISO_639:mhr)** <br/> **Олык марий** | **`mhr`** | **[Macedonian](http://en.wikipedia.org/wiki/ISO_639:mkd)** <br/> **Македонски** | **`mk`** | **[Tsonga](http://en.wikipedia.org/wiki/ISO_639:tso)** <br/> **Xitsonga** | **`ts`** |
| **[English](http://en.wikipedia.org/wiki/ISO_639:eng)** <br/> **English** | **`en`** | **[Maithili](http://en.wikipedia.org/wiki/ISO_639:mai)** <br/> **मैथिली** | **`mai`** | **[Turkish](http://en.wikipedia.org/wiki/ISO_639:tur)** <br/> **Türkçe** | **`tr`** |
| **[Esperanto](http://en.wikipedia.org/wiki/ISO_639:epo)** <br/> **Esperanto** | **`eo`** | **[Malagasy](http://en.wikipedia.org/wiki/ISO_639:mlg)** <br/> **Malagasy** | **`mg`** | **[Turkmen](http://en.wikipedia.org/wiki/ISO_639:tuk)** <br/> **Türkmen** | **`tk`** |
| **[Estonian](http://en.wikipedia.org/wiki/ISO_639:est)** <br/> **Eesti** | **`et`** | **[Malay](http://en.wikipedia.org/wiki/ISO_639:msa)** <br/> **Bahasa Melayu** | **`ms`** | **[Twi](http://en.wikipedia.org/wiki/ISO_639:twi)** <br/> **Twi** | **`tw`** |
| **[Ewe](http://en.wikipedia.org/wiki/ISO_639:ewe)** <br/> **Eʋegbe** | **`ee`** | **[Malayalam](http://en.wikipedia.org/wiki/ISO_639:mal)** <br/> **മലയാളം** | **`ml`** | **[Udmurt](http://en.wikipedia.org/wiki/ISO_639:udm)** <br/> **Удмурт** | **`udm`** |
| **[Faroese](http://en.wikipedia.org/wiki/ISO_639:fao)** <br/> **Føroyskt** | **`fo`** | **[Maltese](http://en.wikipedia.org/wiki/ISO_639:mlt)** <br/> **Malti** | **`mt`** | **[Ukrainian](http://en.wikipedia.org/wiki/ISO_639:ukr)** <br/> **Українська** | **`uk`** |
| **[Fijian](http://en.wikipedia.org/wiki/ISO_639:fij)** <br/> **Vosa Vakaviti** | **`fj`** | **[Maori](http://en.wikipedia.org/wiki/ISO_639:mri)** <br/> **Māori** | **`mi`** | **[Upper Sorbian](http://en.wikipedia.org/wiki/ISO_639:hsb)** <br/> **Hornjoserbšćina** | **`hsb`** |
| **[Filipino](http://en.wikipedia.org/wiki/ISO_639:fil)** <br/> **Filipino** | **`tl`** | **[Marathi](http://en.wikipedia.org/wiki/ISO_639:mar)** <br/> **मराठी** | **`mr`** | **[Urdu](http://en.wikipedia.org/wiki/ISO_639:urd)** <br/> **اُردُو** | **`ur`** |
| **[Finnish](http://en.wikipedia.org/wiki/ISO_639:fin)** <br/> **Suomi** | **`fi`** | **[Meiteilon](http://en.wikipedia.org/wiki/ISO_639:mni)** <br/> **ꯃꯤꯇꯩꯂꯣꯟ** | **`mni-Mtei`** | **[Uyghur](http://en.wikipedia.org/wiki/ISO_639:uig)** <br/> **ئۇيغۇر تىلى** | **`ug`** |
| **[French](http://en.wikipedia.org/wiki/ISO_639:fra)** <br/> **Français** | **`fr`** | **[Mizo](http://en.wikipedia.org/wiki/ISO_639:lus)** <br/> **Mizo ṭawng** | **`lus`** | **[Uzbek](http://en.wikipedia.org/wiki/ISO_639:uzb)** <br/> **Oʻzbek tili** | **`uz`** |
| **[French (Canadian)](http://en.wikipedia.org/wiki/ISO_639:fra)** <br/> **Français canadien** | **`fr-CA`** | **[Mongolian](http://en.wikipedia.org/wiki/ISO_639:mon)** <br/> **Монгол** | **`mn`** | **[Vietnamese](http://en.wikipedia.org/wiki/ISO_639:vie)** <br/> **Tiếng Việt** | **`vi`** |
| **[Frisian](http://en.wikipedia.org/wiki/ISO_639:fry)** <br/> **Frysk** | **`fy`** | **[Mongolian (Traditional)](http://en.wikipedia.org/wiki/ISO_639:mon)** <br/> **ᠮᠣᠩᠭᠣᠯ** | **`mn-Mong`** | **[Volapük](http://en.wikipedia.org/wiki/ISO_639:vol)** <br/> **Volapük** | **`vo`** |
| **[Galician](http://en.wikipedia.org/wiki/ISO_639:glg)** <br/> **Galego** | **`gl`** | **[Myanmar](http://en.wikipedia.org/wiki/ISO_639:mya)** <br/> **မြန်မာစာ** | **`my`** | **[Welsh](http://en.wikipedia.org/wiki/ISO_639:cym)** <br/> **Cymraeg** | **`cy`** |
| **[Georgian](http://en.wikipedia.org/wiki/ISO_639:kat)** <br/> **ქართული** | **`ka`** | **[Nepali](http://en.wikipedia.org/wiki/ISO_639:nep)** <br/> **नेपाली** | **`ne`** | **[Wolof](http://en.wikipedia.org/wiki/ISO_639:wol)** <br/> **Wollof** | **`wo`** |
| **[German](http://en.wikipedia.org/wiki/ISO_639:deu)** <br/> **Deutsch** | **`de`** | **[Norwegian](http://en.wikipedia.org/wiki/ISO_639:nor)** <br/> **Norsk** | **`no`** | **[Xhosa](http://en.wikipedia.org/wiki/ISO_639:xho)** <br/> **isiXhosa** | **`xh`** |
| **[Greek](http://en.wikipedia.org/wiki/ISO_639:ell)** <br/> **Ελληνικά** | **`el`** | **[Occitan](http://en.wikipedia.org/wiki/ISO_639:oci)** <br/> **Occitan** | **`oc`** | **[Yakut](http://en.wikipedia.org/wiki/ISO_639:sah)** <br/> **Sakha** | **`sah`** |
| **[Greenlandic](http://en.wikipedia.org/wiki/ISO_639:kal)** <br/> **Kalaallisut** | **`kl`** | **[Odia](http://en.wikipedia.org/wiki/ISO_639:ori)** <br/> **ଓଡ଼ିଆ** | **`or`** | **[Yiddish](http://en.wikipedia.org/wiki/ISO_639:yid)** <br/> **ייִדיש** | **`yi`** |
| **[Guarani](http://en.wikipedia.org/wiki/ISO_639:gug)** <br/> **Avañe'ẽ** | **`gn`** | **[Oromo](http://en.wikipedia.org/wiki/ISO_639:orm)** <br/> **Afaan Oromoo** | **`om`** | **[Yoruba](http://en.wikipedia.org/wiki/ISO_639:yor)** <br/> **Yorùbá** | **`yo`** |
| **[Gujarati](http://en.wikipedia.org/wiki/ISO_639:guj)** <br/> **ગુજરાતી** | **`gu`** | **[Papiamento](http://en.wikipedia.org/wiki/ISO_639:pap)** <br/> **Papiamentu** | **`pap`** | **[Yucatec Maya](http://en.wikipedia.org/wiki/ISO_639:yua)** <br/> **Màaya T'àan** | **`yua`** |
| **[Haitian Creole](http://en.wikipedia.org/wiki/ISO_639:hat)** <br/> **Kreyòl Ayisyen** | **`ht`** | **[Pashto](http://en.wikipedia.org/wiki/ISO_639:pus)** <br/> **پښتو** | **`ps`** | **[Zulu](http://en.wikipedia.org/wiki/ISO_639:zul)** <br/> **isiZulu** | **`zu`** |
| **[Hausa](http://en.wikipedia.org/wiki/ISO_639:hau)** <br/> **Hausa** | **`ha`** | **[Persian](http://en.wikipedia.org/wiki/ISO_639:fas)** <br/> **فارسی** | **`fa`** |
| **[Hawaiian](http://en.wikipedia.org/wiki/ISO_639:haw)** <br/> **ʻŌlelo Hawaiʻi** | **`haw`** | **[Polish](http://en.wikipedia.org/wiki/ISO_639:pol)** <br/> **Polski** | **`pl`** |
## Wiki
Lists of all languages, writing systems and fonts for reference:
* **[Languages](https://github.com/soimort/translate-shell/wiki/Languages)**
* **[Writing Systems and Fonts](https://github.com/soimort/translate-shell/wiki/Writing-Systems-and-Fonts)**
The following pages demonstrate the advanced usage of **Translate Shell**:
* **[REPL](https://github.com/soimort/translate-shell/wiki/REPL)**
* **[Text Editor Integration](https://github.com/soimort/translate-shell/wiki/Text-Editor-Integration)**
* **[Narrator Selection](https://github.com/soimort/translate-shell/wiki/Narrator-Selection)**
* **[Configuration](https://github.com/soimort/translate-shell/wiki/Configuration)**
* **[Themes](https://github.com/soimort/translate-shell/wiki/Themes)**
* **[AppleScript](https://github.com/soimort/translate-shell/wiki/AppleScript)**
Find out whether your Linux distribution has included **Translate Shell** in its official repository. If not, contribute one:
* **[Distros](https://github.com/soimort/translate-shell/wiki/Distros)**
Frequently Asked Questions, historical stuff, AWK coding style, etc.:
* **[FAQ](https://github.com/soimort/translate-shell/wiki/FAQ)**
* **[History](https://github.com/soimort/translate-shell/wiki/History)**
* **[AWK Style Guide](https://github.com/soimort/translate-shell/wiki/AWK-Style-Guide)**
## Reporting Bugs / Contributing
Please review the [guidelines for contributing](https://github.com/soimort/translate-shell/blob/stable/CONTRIBUTING.md) before reporting an issue or sending a pull request.
## Licensing
This is free and unencumbered software released into the public domain. See **[LICENSE](https://github.com/soimort/translate-shell/blob/stable/LICENSE)** and **[WAIVER](https://github.com/soimort/translate-shell/blob/stable/WAIVER)** for details.
================================================
FILE: README.template.md
================================================
# Translate Shell
[](https://www.soimort.org/translate-shell)
[](https://circleci.com/gh/soimort/translate-shell)
[](https://github.com/soimort/translate-shell/actions)
[](https://github.com/soimort/translate-shell/releases)
[](https://www.soimort.org/translate-shell/trans)
[](https://gitter.im/soimort/translate-shell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
**[Translate Shell](https://www.soimort.org/translate-shell)** (formerly _Google Translate CLI_) is a command-line translator powered by **[Google Translate](https://translate.google.com/)** (default), **[Bing Translator](https://www.bing.com/translator)**, **[Yandex.Translate](https://translate.yandex.com/)**, and **[Apertium](https://www.apertium.org/)**. It gives you easy access to one of these translation engines in your terminal:
```
$ trans 'Saluton, Mondo!'
Saluton, Mondo!
Hello, World!
Translations of Saluton, Mondo!
[ Esperanto -> English ]
Saluton ,
Hello,
Mondo !
World!
```
By default, translations with detailed explanations are shown. You can also translate the text briefly: (only the most relevant translation will be shown)
```
$ trans -brief 'Saluton, Mondo!'
Hello, World!
```
**Translate Shell** can also be used like an interactive shell; input the text to be translated line by line:
```
$ trans -shell -brief
> Rien ne réussit comme le succès.
Nothing succeeds like success.
> Was mich nicht umbringt, macht mich stärker.
What does not kill me makes me stronger.
> Юмор есть остроумие глубокого чувства.
Humor has a deep sense of wit.
> 學而不思則罔,思而不學則殆。
Learning without thought is labor lost, thought without learning is perilous.
> 幸福になるためには、人から愛されるのが一番の近道。
In order to be happy, the best way is to be loved by people.
```
## Prerequisites
### System Requirements
**Translate Shell** is known to work on many POSIX-compliant systems, including but not limited to:
* GNU/Linux
* macOS
* *BSD
* Android (through Termux)
* Windows (through WSL, Cygwin, or MSYS2)
### Dependencies
* **[GNU Awk](https://www.gnu.org/software/gawk/)** (**gawk**) **4.0 or later**
* This program relies heavily on GNU extensions of the [AWK language](http://en.wikipedia.org/wiki/AWK), which are non-portable for other AWK implementations (e.g. nawk).
* How to get gawk:
* 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.
### Recommended Dependencies
These dependencies are optional, but strongly recommended for full functionality:
* **[curl](http://curl.haxx.se/)** with **OpenSSL** support
* **[GNU FriBidi](http://fribidi.org/)**: _an implementation of the Unicode Bidirectional Algorithm (bidi)_
* required for displaying text in Right-to-Left scripts (e.g. Arabic, Hebrew)
* **[mplayer](http://www.mplayerhq.hu/)**, **[mpv](http://mpv.io/)**, **[mpg123](http://mpg123.org/)**, or **[eSpeak](http://espeak.sourceforge.net/)**
* required for the Text-to-Speech functionality
* **[less](http://www.greenwoodsoftware.com/less/)**, **[more](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/more.html)** or **[most](http://www.jedsoft.org/most/)**
* required for terminal paging
* **[rlwrap](http://utopia.knoware.nl/~hlub/uck/rlwrap/#rlwrap)**: *a GNU readline wrapper*
* required for readline-style editing and history in the interactive shell
* **[aspell](http://aspell.net/)** or **[hunspell](http://hunspell.github.io/)**
* required for spell checking
### Environment and Fonts
It is a must to have corresponding fonts for the language(s) / script(s) you wish to display in your terminal. See **[wiki: Writing Systems and Fonts](https://github.com/soimort/translate-shell/wiki/Writing-Systems-and-Fonts#unicode-fonts)** for more details on scripts and recommended Unicode fonts.
## Try It Out!
Start an interactive shell and translate anything you input into your native language: (in **bash** or **zsh**)
$ gawk -f <(curl -Ls --compressed https://git.io/translate) -- -shell
(in **fish**)
$ gawk -f (curl -Ls --compressed https://git.io/translate | psub) -- -shell
### Using Docker
To try out via [Docker](https://www.docker.com/), run:
$ docker pull soimort/translate-shell
Then you may start an interactive shell from the Docker image for translating:
$ docker run -it soimort/translate-shell -shell
## Installation
### Option #1. Direct Download
Download [the self-contained executable](http://git.io/trans) and place it into your path. It's everything you need.
$ wget git.io/trans
$ chmod +x ./trans
There is a [GPG signature](https://www.soimort.org/translate-shell/trans.sig).
### Option #2. From A Package Manager
#### Using your favorite package manager
See **[wiki: Distros](https://github.com/soimort/translate-shell/wiki/Distros)** on how to install from a specific package manager on your distro.
#### Using [Antigen](https://github.com/zsh-users/antigen) (for Zsh users)
Add the following line to your `.zshrc`:
antigen bundle soimort/translate-shell@develop
### Option #3. From Git
$ git clone https://github.com/soimort/translate-shell
$ cd translate-shell/
$ make
$ [sudo] make install
In case you have only zsh but not bash in your system, build with:
$ make TARGET=zsh
The default `PREFIX` of installation is `/usr/local`. To install the program to somewhere else (e.g. `/usr`, `~/.local`), use:
$ [sudo] make PREFIX=/usr install
## Getting Started by Examples
### Translate a Word
#### From any language to your language
Google Translate can identify the language of the source text automatically, and Translate Shell by default translates the source text into the language of your `locale`.
$ trans vorto
#### From any language to one or more specific languages
Translate a word into French:
$ trans :fr word
Translate a word into Chinese and Japanese: (use a plus sign "`+`" as the delimiter)
$ trans :zh+ja word
Alternatively, equals sign ("`=`") can be used in place of the colon ("`:`"). Note that in some shells (e.g. zsh), equals signs may be interpreted differently, therefore the argument specifying languages needs to be protected:
$ trans {=zh+ja} word
$ trans '=zh+ja' word
You can also use the `-target` (`-t`) option to specify the target language(s):
$ trans -t zh+ja word
With the `-t` option, the name of the language may also be used instead of the language code:
$ trans -t japanese word
$ trans -t 日本語 word
#### From a specific language
Google Translate may wrongly identify the source text as some other language than you expected:
$ trans 手紙
In that case, you need to specify its language explicitly:
$ trans ja: 手紙
$ trans zh: 手紙
You can also use the `-source` (`-s`) option to specify the source language:
$ trans -s ja 手紙
### Translate Multiple Words or a Phrase
Translate each word alone:
$ trans en:zh word processor
Put words into one argument, and translate them as a whole:
$ trans en:zh "word processor"
### Translate a Sentence
Translating a sentence is much the same like translating a phrase; you can just quote the sentence into one argument:
$ trans :zh "To-morrow, and to-morrow, and to-morrow,"
$ trans :zh 'To-morrow, and to-morrow, and to-morrow,'
It is also possible to translate multi-line sentences:
$ trans :zh "Creeps in this petty pace from day to day,
> To the last syllable of recorded time;
> And all our yesterdays have lighted fools
> The way to dusty death."
To avoid punctuation marks (e.g. "`!`") or other special characters being interpreted by the shell, use *single quotes*:
$ trans :zh 'Out, out, brief candle!'
There are some cases though, you may still want to use *double quotes*: (e.g. the sentence contains a single quotation mark "`'`")
$ trans :zh "Life's but a walking shadow, a poor player"
Alternatively, use the `-join-sentence` (`-j`) option to treat all arguments as one sentence so that quotes can be omitted:
$ trans -j :zh Life\'s but a walking shadow, a poor player
### Brief Mode
By default, Translate Shell displays translations in a verbose manner. If you prefer to see only the most relevant translation, there is a brief mode available using the `-brief` (`-b`) option:
$ trans -b :fr "Saluton, Mondo"
In brief mode, phonetic notation (if any) is not shown by default. To enable this, put an at sign "`@`" in front of the language code:
$ trans -b :@ja "Saluton, Mondo"
### Dictionary Mode
Google Translate can be used as a dictionary. When translating a word and the target language is the same as the source language, the dictionary entry of the word is shown:
$ trans :en word
To enable dictionary mode no matter whether the source language and the target language are identical, use the `-dictionary` (`-d`) option.
$ trans -d fr: mot
**Note:** Not every language supported by Google Translate has provided dictionary data. See **[wiki: Languages](https://github.com/soimort/translate-shell/wiki/Languages)** to find out which language(s) has dictionary support.
### Language Identification
Use the `-identify` (`-id`) option to identify the language of the text:
$ trans -id 言葉
### Text-to-Speech
Use the `-play` (`-p`) option to listen to the translation:
$ trans -b -p :ja "Saluton, Mondo"
Use the `-speak` (`-sp`) option to listen to the original text:
$ trans -sp "你好,世界"
### Terminal Paging
Sometimes the content of translation can be too much for display in one screen. Use the `-view` (`-v`) option to view the translation in a terminal pager such as `less` or `more`:
$ trans -d -v word
### Right-to-Left (RTL) Languages
[Right-to-Left (RTL) languages](http://en.wikipedia.org/wiki/Right-to-left) are well supported via [GNU FriBidi](http://fribidi.org/).
The program will automatically adjust the screen width for padding when displaying right-to-left languages. Alternatively, you may use the `-width` (`-w`) option to specify the screen width:
$ trans -b -w 40 :he "Saluton, Mondo"
See **[wiki: Languages](https://github.com/soimort/translate-shell/wiki/Languages)** to find out which language(s) uses a Right-to-Left writing system.
### Pipeline, Input and Output
If no source text is given in command-line arguments, the program will read from standard input, or from the file specified by the `-input` (`-i`) option:
$ echo "Saluton, Mondo" | trans -b :fr
$ trans -b -i input.txt :fr
Translations are written to standard output, or to the file specified by the `-output` (`-o`) option:
$ echo "Saluton, Mondo" | trans -b -o output.txt :fr
### Translate a File
Instead of using the `-input` option, a [file URI scheme](http://en.wikipedia.org/wiki/File_URI_scheme) (`file://` followed by the file name) can be used as a command-line argument:
$ trans :fr file://input.txt
**Note**: Brief mode is used when translating from file URI schemes.
### Translate a Web Page
To translate a web page, an http(s) URI scheme can be used as an argument:
$ trans :fr http://www.w3.org/
A browser session will open for viewing the translation (via Google Translate's web interface). To specify your web browser of choice, use the `-browser` option:
$ trans -browser firefox :fr http://www.w3.org/
### Language Details
Use the `-linguist` (`-L`) option to view details of one or more languages:
$ trans -L fr
$ trans -L de+en
Some basic information of the language will be displayed: its English name and endonym (language name in the language itself), language family, writing system, canonical Google Translate code and ISO 639-3 code.
### Interactive Translate Shell (REPL)
Start an interactive shell using the `-shell` (or `-interactive`, `-I`) option:
$ trans -shell
You may specify the source language and the target language(s) before starting an interactive shell:
$ trans -shell en:fr
You may also change these settings during an interactive session. See **[wiki: REPL](https://github.com/soimort/translate-shell/wiki/REPL)** for more advanced usage of the interactive Translate Shell.
## Usage
For more details on command-line options, see the man page **[trans(1)](https://www.soimort.org/translate-shell/trans.1.html)** or use `trans -M` in a terminal.
```
$usage$
```
## Code List
Use `trans -R` or `trans -T` to view the reference table in a terminal.
For more details on languages and corresponding codes, see **[wiki: Languages](https://github.com/soimort/translate-shell/wiki/Languages)**.
$code-list$
## Wiki
$wiki-home$
## Reporting Bugs / Contributing
Please review the [guidelines for contributing](https://github.com/soimort/translate-shell/blob/stable/CONTRIBUTING.md) before reporting an issue or sending a pull request.
## Licensing
This is free and unencumbered software released into the public domain. See **[LICENSE](https://github.com/soimort/translate-shell/blob/stable/LICENSE)** and **[WAIVER](https://github.com/soimort/translate-shell/blob/stable/WAIVER)** for details.
================================================
FILE: WAIVER
================================================
# Copyright waiver for <https://github.com/soimort/translate-shell>
I dedicate any and all copyright interest in this software to the
public domain. I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors. I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
To the best of my knowledge and belief, my contributions are either
originally authored by me or are derived from prior works which I have
verified are also in the public domain and are not subject to claims
of copyright by other parties.
To the best of my knowledge and belief, no individual, business,
organization, government, or other entity has any copyright interest
in my contributions, and I affirm that I will not make contributions
that are otherwise encumbered.
================================================
FILE: build.awk
================================================
#!/usr/bin/gawk -f
# Not all 4.x versions of gawk can handle @include without ".awk" extension
# But the build.awk script and the single build should support gawk 4.0+.
@include "include/Commons.awk"
@include "include/Utils.awk"
@include "include/LanguageData.awk"
@include "include/LanguageHelper.awk"
@include "metainfo.awk"
function init() {
BuildPath = "build/"
Trans = BuildPath Command
TransAwk = Trans ".awk"
ManPath = "man/"
Man = ManPath Command ".1"
ManTemplate = Man ".template.md"
ManMarkdown = Man ".md"
ManHtmlTemplate = Man ".template.html"
ManHtml = Man ".html"
PagesPath = "gh-pages/"
BadgeDownload = PagesPath "images/badge-download"
BadgeRelease = PagesPath "images/badge-release"
Index = PagesPath "index.md"
ReadmePath = "./"
ReadmeTemplate = ReadmePath "README.template.md"
Readme = ReadmePath "README.md"
WikiPath = "wiki/"
WikiHome = WikiPath "Home.md"
WikiLanguages = WikiPath "Languages.md"
WikiLanguagesHtml = WikiLanguages ".html"
RegistryPath = "registry/"
MainRegistryTemplate = RegistryPath "index.template.trans"
MainRegistry = RegistryPath "index.trans"
}
function man( text) {
text = readFrom(ManTemplate)
gsub(/\$Version\$/, Version, text)
gsub(/\$ReleaseDate\$/, ReleaseDate, text)
writeTo(text, ManMarkdown)
if (fileExists(ManHtmlTemplate))
system("pandoc -s -f markdown-smart -t html --toc --toc-depth 1 --template " ManHtmlTemplate " " ManMarkdown " -o " ManHtml)
return system("pandoc -s -f markdown-smart -t man " ManMarkdown " -o " Man)
}
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")
gsub(/\$usage\$/, content, text)
initBiDi(); initLocale()
# 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
i = 0
saveSortedIn = PROCINFO["sorted_in"]
PROCINFO["sorted_in"] = "compName"
for (code in Locale) {
# Ignore unstable languages
if (Locale[code]["support"] == "unstable") continue
col = int(i / rows)
append(cols[col], code)
i++
}
PROCINFO["sorted_in"] = saveSortedIn
r = "| Language | Code | Language | Code | Language | Code |" RS \
"| :------: | :--: | :------: | :--: | :------: | :--: |" RS
for (i = 0; i < rows; i++) {
r = r "| "
for (j = 0; j < 3; j++)
if (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 \
")** <br/> **" getEndonym(cols[j][i]) "** | **`" cols[j][i] "`** | "
}
r = r RS
}
gsub(/\$code-list\$/, r, text)
content = readFrom(WikiHome)
gsub(/\$wiki-home\$/, content, text)
writeTo(text, Readme)
return 0
}
function wiki( code, group, iso, language, saveSortedIn) {
initBiDi(); initLocale()
#print "***" length(Locale) "*** *languages in total. "
print "*Generated from the source code of Translate Shell " Version ".*\n" > WikiLanguages
print "*Version: [English](https://github.com/soimort/translate-shell/wiki/Languages) " \
"| [Chinese Simplified](https://github.com/soimort/translate-shell/wiki/Languages-%28%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%29)*\n" > WikiLanguages
print "| Code | Name | Family | [Writing system](https://github.com/soimort/translate-shell/wiki/Writing-Systems-and-Fonts) | Is [RTL](http://en.wikipedia.org/wiki/Right-to-left)? | Has dictionary? |" > WikiLanguages
print "| :--: | ---: | -----: | :------------: | :---------------------------------------------------: | :-------------: |" > WikiLanguages
saveSortedIn = PROCINFO["sorted_in"]
PROCINFO["sorted_in"] = "@ind_num_asc"
for (code in Locale) {
# Ignore unstable languages and non-languages
if (Locale[code]["support"] == "unstable") continue
if (Locale[code]["status"] == "non-language") continue
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, "_")
print sprintf("| **`%s`** <br/> [`%s`](%s) | **[%s](%s)** <br/> **%s** | %s | `%s` | %s | %s |",
getCode(code), iso, "http://www.ethnologue.com/language/" iso,
getName(code), "http://en.wikipedia.org/wiki/ISO_639:" iso, getEndonym(code),
getFamily(code), getScript(code),
isRTL(code) ? "✓" : NULLSTR,
hasDictionary(code) ? "✓" : NULLSTR) > WikiLanguages
}
PROCINFO["sorted_in"] = saveSortedIn
return system("pandoc -s -t html " WikiLanguages " -o " WikiLanguagesHtml)
}
function doc() {
man()
readme()
wiki()
return 0
}
function readSqueezed(fileName, squeezed, group, line, ret) {
if (fileName ~ /\*$/ || fileName ~ /_$/) # glob simulation
return readSqueezed(fileName ".awk", squeezed)
ret = NULLSTR
if (fileExists(fileName))
while (getline line < fileName) {
match(line, /^[[:space:]]*@include[[:space:]]*"(.*)"$/, group)
if (RSTART) { # @include
if (group[1] ~ /\.awk$/)
append(Includes, group[1])
if (ret) ret = ret RS
ret = ret readSqueezed(group[1], squeezed)
} else if (!squeezed || line = squeeze(line)) { # effective LOC
if (ret) ret = ret RS
ret = ret line
}
}
return ret
}
function build(target, type, i, group, inline, line, temp) {
# Default target: bash
if (!target) target = "bash"
("mkdir -p " parameterize(BuildPath)) | getline
if (target == "bash" || target == "zsh") {
print "#!/usr/bin/env " target > Trans
if (fileExists("DISCLAIMER")) {
print "#" > Trans
while (getline line < "DISCLAIMER")
print "# " line > Trans
print "#" > Trans
}
print "export TRANS_ENTRY=\"$0\"" > Trans
print "if [[ ! $LANG =~ (UTF|utf)-?8$ ]]; then export LANG=en_US.UTF-8; fi" > Trans
print "read -r -d '' TRANS_PROGRAM << 'EOF'" > Trans
print readSqueezed(EntryPoint, TRUE) > Trans
print "EOF" > Trans
print "read -r -d '' TRANS_MANPAGE << 'EOF'" > Trans
if (fileExists(Man))
while (getline line < Man)
print line > Trans
print "EOF" > Trans
print "export TRANS_MANPAGE" > Trans
if (type == "release")
print "export TRANS_BUILD=release" temp > Trans
else {
temp = getGitHead()
if (temp)
print "export TRANS_BUILD=git:" temp > Trans
}
print "gawk -f <(echo -E \"$TRANS_PROGRAM\") - \"$@\"" > Trans
("chmod +x " parameterize(Trans)) | getline
# Rebuild EntryScript
print "#!/bin/sh" > EntryScript
print "export TRANS_DIR=`dirname $0`" > EntryScript
print "gawk \\" > EntryScript
for (i = 0; i < length(Includes) - 1; i++)
print "-i \"${TRANS_DIR}/" Includes[i] "\" \\" > EntryScript
print "-f \"${TRANS_DIR}/" Includes[i] "\" -- \"$@\"" > EntryScript
("chmod +x " parameterize(EntryScript)) | getline
return 0
} else if (target == "awk" || target == "gawk") {
"uname -s" | getline temp
print (temp == "Darwin" ?
"#!/usr/bin/env gawk -f" : # macOS
"#!/usr/bin/gawk -f") > TransAwk
print readSqueezed(EntryPoint, TRUE) > TransAwk
("chmod +x " parameterize(TransAwk)) | getline
return 0
} else {
w("[FAILED] Unknown target: " ansi("underline", target))
w(" Supported targets: " \
ansi("underline", "bash") ", " \
ansi("underline", "zsh") ", " \
ansi("underline", "gawk"))
return 1
}
}
function clean() {
("rm -f " BuildPath Command "*") | getline
return 0
}
function release( content, group, sha1, size, temp, text) {
d("Updating registry ...")
# Update registry
text = readFrom(MainRegistryTemplate)
gsub(/\$Version\$/, Version, text)
writeTo(text, MainRegistry)
d("Updating gh-pages/images ...")
# Update gh-pages/images/badge-release
text = readFrom(BadgeRelease ".temp")
gsub(/\$Version\$/, Version, text)
writeTo(text, BadgeRelease)
system("save-to-png " BadgeRelease)
# Update gh-pages/images/badge-download
("wc -c " Trans) | getline temp
split(temp, group)
size = int(group[1] / 1000)
text = readFrom(BadgeDownload ".temp")
gsub(/\$Size\$/, size, text)
writeTo(text, BadgeDownload)
system("save-to-png " BadgeDownload)
d("Updating gh-pages/index.md ...")
# Update gh-pages/index.md
("sha1sum " Trans) | getline temp
split(temp, group)
sha1 = group[1]
content = readFrom(Readme)
text = readFrom(Index ".temp")
gsub(/\$sha1\$/, sha1, text)
gsub(/\$Version\$/, Version, text)
gsub(/\$readme\$/, content, text)
writeTo(text, Index)
return 0
}
function test() {
return 0
}
BEGIN {
init()
pos = 0
while (ARGV[++pos]) {
# -target TARGET
match(ARGV[pos], /^--?target(=(.*)?)?$/, group)
if (RSTART) {
target = tolower(group[2] ? group[2] : ARGV[++pos])
continue
}
# -type TYPE
match(ARGV[pos], /^--?type(=(.*)?)?$/, group)
if (RSTART) {
type = tolower(group[2] ? group[2] : ARGV[++pos])
continue
}
# TASK
match(ARGV[pos], /^[^\-]/, group)
if (RSTART) {
append(tasks, ARGV[pos])
continue
}
}
# Default task: build
if (!anything(tasks)) tasks[0] = "build"
for (i = 0; i < length(tasks); i++) {
task = tasks[i]
status = 0
switch (task) {
case "man":
status = man()
break
case "readme":
status = readme()
break
case "wiki":
status = wiki()
break
case "doc":
status = doc()
break
case "build":
status = build(target, type)
break
case "clean":
status = clean()
break
case "release":
status = release()
break
case "test":
status = test()
break
default: # unknown task
status = -1
}
if (status == 0) {
d("[OK] Task " ansi("bold", task) " completed.")
} else if (status < 0) {
w("[FAILED] Unknown task: " ansi("bold", task))
exit 1
} else {
w("[FAILED] Task " ansi("bold", task) " failed.")
exit 1
}
}
}
================================================
FILE: google-translate-mode.el
================================================
;;; google-translate-mode.el --- Google Translate minor mode
;; This file is distributed as part of translate-shell
;; URL: https://github.com/soimort/translate-shell
;; Last-Updated: 2015-04-08 Wed
;; This is free and unencumbered software released into the public domain.
;;; Code:
(defcustom trans-command "trans"
"trans command name."
:type 'string
:group 'google-translate-mode)
(defcustom trans-verbose-p nil
"Is in verbose mode. (default: nil)"
:type 'boolean
:group 'google-translate-mode)
(defcustom trans-source "auto"
"Source language. (default: auto)"
:type 'string
:group 'google-translate-mode)
(defcustom trans-target "en"
"Target language. (default: en)"
:type 'string
:group 'google-translate-mode)
(defun trans (verbose source target text)
(shell-command-to-string
(concat trans-command
(if verbose "" " -b")
(if source (concat " -s " source) "")
(if target (concat " -t " target) "")
" " text)))
(defun show-translation ()
"Show translation of the current word in message buffer."
(interactive)
(message
(trans trans-verbose-p trans-source trans-target (current-word))))
(defun view-translation ()
"View verbose translation of the current word in popup dialog."
(interactive)
(let ((translation
(trans t trans-source trans-target (current-word))))
(x-popup-menu t (list "Translation"
(list "PANE"
(list translation nil))))))
(defun insert-translation ()
"Insert translation of the current word right after."
(interactive)
(insert " ")
(insert
(trans trans-verbose-p trans-source trans-target (current-word))))
(defvar google-translate-mode-keymap
(let
((map (make-sparse-keymap)))
(define-key map (kbd "C-c -") 'show-translation)
(define-key map (kbd "C-c =") 'view-translation)
(define-key map (kbd "C-c +") 'insert-translation)
map)
"Keymap for Google Translate minor mode.")
(define-minor-mode google-translate-mode
"Google Translate"
:keymap google-translate-mode-keymap)
(provide 'google-translate-mode)
================================================
FILE: include/Commons.awk
================================================
####################################################################
# Commons.awk #
####################################################################
# Initialize constants.
function initConst() {
NULLSTR = ""
NONE = "\0"
TRUE = 1
STDIN = "/dev/stdin"
STDOUT = "/dev/stdout"
STDERR = "/dev/stderr"
SUPOUT = " > /dev/null " # suppress output
SUPERR = " 2> /dev/null " # suppress error
PIPE = " | "
}
## Arrays:
# Return 1 if the array contains anything; otherwise return 0.
function anything(array,
####
i) {
for (i in array)
if (array[i]) return 1
return 0
}
# Return 1 if the value is non-empty or an array that contains anything;
# Otherwise, return 0.
function exists(value) {
if (isarray(value))
return anything(value)
else
return value ? 1 : 0
}
# Return an element if it belongs to the array;
# Otherwise, return a null string.
function belongsTo(element, array,
####
i) {
for (i in array)
if (element == array[i]) return element
return NULLSTR
}
# Return non-zero if two values are identical;
# Otherwise, return 0.
function identical(x, y,
####
i) {
if (!isarray(x) && !isarray(y))
return x == y
else if (isarray(x) && isarray(y)) {
if (length(x) != length(y)) return 0
for (i in x)
if (!identical(x[i], y[i])) return 0
return 1
} else
return 0
}
# Append an element into an array (zero-based).
function append(array, element) {
array[anything(array) ? length(array) : 0] = element
}
# Comparator function used for controlling array scanning order.
# Like @ind_num_asc, but compare on index fields separated by SUBSEP.
function compareByIndexFields(i1, v1, i2, v2,
####
t1, t2, tl, j) {
split(i1, t1, SUBSEP)
split(i2, t2, SUBSEP)
tl = length(t1) < length(t2) ? length(t1) : length(t2)
for (j = 1; j <= tl; j++) {
if (t1[j] < t2[j])
return -1
else if (t1[j] > t2[j])
return 1
}
return 0
}
## Strings:
# Return non-zero if the string represents a numeral;
# Otherwise, return 0.
function isnum(string) {
return string == string + 0
}
# Return one of the substrings if the string starts with it;
# Otherwise, return a null string.
function startsWithAny(string, substrings,
####
i) {
for (i in substrings)
if (index(string, substrings[i]) == 1) return substrings[i]
return NULLSTR
}
# Return one of the patterns if the string matches this pattern at the beginning;
# Otherwise, return a null string.
function matchesAny(string, patterns,
####
i) {
for (i in patterns)
if (string ~ "^" patterns[i]) return patterns[i]
return NULLSTR
}
# Make the first character of string upper-case.
function ucfirst(string) {
if (length(string) >= 2)
return toupper(substr(string, 1, 1)) substr(string, 2)
else if (length(string) == 1)
return toupper(string)
return NULLSTR
}
# Replicate a string.
function replicate(string, len,
####
i, temp) {
temp = NULLSTR
for (i = 0; i < len; i++)
temp = temp string
return temp
}
# Reverse a string.
function reverse(string,
####
i, temp) {
temp = NULLSTR
for (i = length(string); i > 0; i--)
temp = temp substr(string, i, 1);
return temp
}
# Join an array into one string;
# Return the string.
function join(array, separator, sortedIn, preserveNull,
####
i, j, saveSortedIn, temp) {
# Default parameter
if (!sortedIn)
sortedIn = "compareByIndexFields"
temp = NULLSTR
j = 0
if (isarray(array)) {
saveSortedIn = PROCINFO["sorted_in"]
PROCINFO["sorted_in"] = sortedIn
for (i in array)
if (preserveNull || array[i] != NULLSTR)
temp = j++ ? temp separator array[i] : array[i]
PROCINFO["sorted_in"] = saveSortedIn
} else
temp = array
return temp
}
# Split a string into characters.
function explode(string, array) {
split(string, array, NULLSTR)
}
# Return the real character represented by an escape sequence.
# Example: escapeChar("n") returns "\n".
# See: <https://en.wikipedia.org/wiki/Escape_character>
# <https://en.wikipedia.org/wiki/Escape_sequences_in_C>
function escapeChar(char) {
switch (char) {
case "b":
return "\b" # Backspace
case "f":
return "\f" # Formfeed
case "n":
return "\n" # Newline (Line Feed)
case "r":
return "\r" # Carriage Return
case "t":
return "\t" # Horizontal Tab
case "v":
return "\v" # Vertical Tab
case "u0026":
return "&" # Unicode Character 'AMPERSAND'
case "u003c":
return "<" # Unicode Character 'LESS-THAN SIGN'
case "u003d":
return "=" # Unicode Character 'EQUALS SIGN'
case "u003e":
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
}
}
# Convert a literal-formatted string into its original string.
function literal(string,
####
c, cc, escaping, i, s) {
if (string !~ /^".*"$/)
return string
explode(string, s)
string = NULLSTR
escaping = 0
for (i = 2; i < length(s); i++) {
c = s[i]
if (escaping) {
if (cc) {
cc = cc c
if (length(cc) == 5) {
string = string escapeChar(cc)
escaping = 0 # escape ends
cc = NULLSTR
}
} else if (c == "u") {
cc = c
} else {
string = string escapeChar(c)
escaping = 0 # escape ends
}
} else {
if (c == "\\")
escaping = 1 # escape begins
else
string = string c
}
}
return string
}
# Return the escaped string.
function escape(string) {
gsub(/\\/, "\\\\", string) # substitute backslashes first
gsub(/"/, "\\\"", string)
return string
}
# Reverse of escape(string).
function unescape(string) {
gsub(/\\"/, "\"", string)
gsub(/\\\\/, "\\", string) # substitute backslashes last
return string
}
# Return the escaped, quoted string.
function parameterize(string, quotationMark) {
if (!quotationMark)
quotationMark = "'"
if (quotationMark == "'") {
gsub(/'/, "'\\''", string)
return "'" string "'"
} else {
return "\"" escape(string) "\""
}
}
# Reverse of parameterize(string, quotationMark).
function unparameterize(string, temp) {
match(string, /^'(.*)'$/, temp)
if (temp[0]) { # use temp[0] (there IS a match for quoted empty string)
string = temp[1]
gsub(/'\\''/, "'", string)
return string
}
match(string, /^"(.*)"$/, temp)
if (temp[0]) {
string = temp[1]
return unescape(string)
}
return string
}
# Convert any value to human-readable string.
function toString(value, inline, heredoc, valOnly, numSub, level, sortedIn,
####
i, items, j, k, p, saveSortedIn, temp, v) {
if (!level) level = 0
if (!sortedIn)
sortedIn = "compareByIndexFields"
if (isarray(value)) {
saveSortedIn = PROCINFO["sorted_in"]
PROCINFO["sorted_in"] = sortedIn
p = 0
for (i in value) {
split(i, j, SUBSEP); k = join(j, ",")
if (!numSub || !isnum(k)) k = parameterize(k, "\"")
v = toString(value[i], inline, heredoc, valOnly, numSub, level + 1, sortedIn)
if (!isarray(value[i])) v = parameterize(v, "\"")
if (valOnly)
items[p++] = inline ? v : (replicate("\t", level) v)
else
items[p++] = inline ? (k ": " v) :
(replicate("\t", level) k "\t" v)
}
PROCINFO["sorted_in"] = saveSortedIn
temp = inline ? join(items, ", ") :
("\n" join(items, "\n") "\n" replicate("\t", level))
temp = valOnly ? ("[" temp "]") : ("{" temp "}")
return temp
} else {
if (heredoc)
return "'''\n" value "\n'''"
else
return value
}
}
# Squeeze a source line of AWK code.
function squeeze(line, preserveIndent) {
# Remove preceding spaces if indentation not preserved
if (!preserveIndent)
gsub(/^[[:space:]]+/, NULLSTR, line)
# Remove comment
gsub(/^[[:space:]]*#.*$/, NULLSTR, line)
# Remove in-line comment
gsub(/#[^"/]*$/, NULLSTR, line)
# Remove trailing spaces
gsub(/[[:space:]]+$/, NULLSTR, line)
gsub(/[[:space:]]+\\$/, "\\", line)
return line
}
# Return 0 if the string starts with '0', 'f', 'n' or 'off';
# Otherwise, return 1.
function yn(string) {
return (tolower(string) ~ /^([0fn]|off)/) ? 0 : 1
}
## Display & Debugging:
# Initialize ANSI escape codes for SGR (Select Graphic Rendition).
# (ANSI X3.64 Standard Control Sequences)
# See: <https://en.wikipedia.org/wiki/ANSI_escape_code>
function initAnsiCode() {
# Dumb terminal: no ANSI escape code whatsoever
if (ENVIRON["TERM"] == "dumb") return
AnsiCode["reset"] = AnsiCode[0] = "\33[0m"
AnsiCode["bold"] = "\33[1m"
AnsiCode["underline"] = "\33[4m"
AnsiCode["negative"] = "\33[7m"
AnsiCode["no bold"] = "\33[22m" # SGR code 21 (bold off) not widely supported
AnsiCode["no underline"] = "\33[24m"
AnsiCode["positive"] = "\33[27m"
AnsiCode["black"] = "\33[30m"
AnsiCode["red"] = "\33[31m"
AnsiCode["green"] = "\33[32m"
AnsiCode["yellow"] = "\33[33m"
AnsiCode["blue"] = "\33[34m"
AnsiCode["magenta"] = "\33[35m"
AnsiCode["cyan"] = "\33[36m"
AnsiCode["gray"] = "\33[37m"
AnsiCode["default"] = "\33[39m"
AnsiCode["dark gray"] = "\33[90m"
AnsiCode["light red"] = "\33[91m"
AnsiCode["light green"] = "\33[92m"
AnsiCode["light yellow"] = "\33[93m"
AnsiCode["light blue"] = "\33[94m"
AnsiCode["light magenta"] = "\33[95m"
AnsiCode["light cyan"] = "\33[96m"
AnsiCode["white"] = "\33[97m"
}
# Return ANSI escaped string.
function ansi(code, text) {
switch (code) {
case "bold":
return AnsiCode[code] text AnsiCode["no bold"]
case "underline":
return AnsiCode[code] text AnsiCode["no underline"]
case "negative":
return AnsiCode[code] text AnsiCode["positive"]
default:
return AnsiCode[code] text AnsiCode[0]
}
}
# Print warning message.
function w(text) {
print ansi("yellow", text) > STDERR
}
# Print error message.
function e(text) {
print ansi("bold", ansi("yellow", text)) > STDERR
}
# What a terrible failure.
function wtf(text) {
print ansi("bold", ansi("red", text)) > STDERR
}
# Print debugging message.
function d(text) {
print ansi("gray", text) > STDERR
}
# Debug any value.
function da(value, name, inline, heredoc, valOnly, numSub, sortedIn,
####
i, j, saveSortedIn) {
# Default parameters
if (!name)
name = "_"
if (!sortedIn)
sortedIn = "compareByIndexFields"
d(name " = " toString(value, inline, heredoc, valOnly, numSub, 0, sortedIn))
#if (isarray(value)) {
# saveSortedIn = PROCINFO["sorted_in"]
# PROCINFO["sorted_in"] = sortedIn
# for (i in value) {
# split(i, j, SUBSEP)
# da(value[i], sprintf(name "[%s]", join(j, ",")), sortedIn)
# }
# PROCINFO["sorted_in"] = saveSortedIn
#} else
# d(name " = " value)
}
# Naive assertion.
function assert(x, message) {
if (!message)
message = "[ERROR] Assertion failed."
if (x)
return x
else
e(message)
}
## URLs:
# Initialize `UrlEncoding`.
# See: <https://en.wikipedia.org/wiki/Percent-encoding>
function initUrlEncoding() {
UrlEncoding["\t"] = "%09"
UrlEncoding["\n"] = "%0A"
UrlEncoding[" "] = "%20"
UrlEncoding["!"] = "%21"
UrlEncoding["\""] = "%22"
UrlEncoding["#"] = "%23"
UrlEncoding["$"] = "%24"
UrlEncoding["%"] = "%25"
UrlEncoding["&"] = "%26"
UrlEncoding["'"] = "%27"
UrlEncoding["("] = "%28"
UrlEncoding[")"] = "%29"
UrlEncoding["*"] = "%2A"
UrlEncoding["+"] = "%2B"
UrlEncoding[","] = "%2C"
UrlEncoding["-"] = "%2D"
UrlEncoding["."] = "%2E"
UrlEncoding["/"] = "%2F"
UrlEncoding[":"] = "%3A"
UrlEncoding[";"] = "%3B"
UrlEncoding["<"] = "%3C"
UrlEncoding["="] = "%3D"
UrlEncoding[">"] = "%3E"
UrlEncoding["?"] = "%3F"
UrlEncoding["@"] = "%40"
UrlEncoding["["] = "%5B"
UrlEncoding["\\"] = "%5C"
UrlEncoding["]"] = "%5D"
UrlEncoding["^"] = "%5E"
UrlEncoding["_"] = "%5F"
UrlEncoding["`"] = "%60"
UrlEncoding["{"] = "%7B"
UrlEncoding["|"] = "%7C"
UrlEncoding["}"] = "%7D"
UrlEncoding["~"] = "%7E"
}
# Return the URL-encoded string.
function quote(string, i, r, s) {
r = NULLSTR
explode(string, s)
for (i = 1; i <= length(s); i++)
r = r (s[i] in UrlEncoding ? UrlEncoding[s[i]] : s[i])
return r
}
# Return the URL-decoded string.
function unquote(string, i, k, r, s, temp) {
r = NULLSTR
explode(string, s)
temp = NULLSTR
for (i = 1; i <= length(s); i++)
if (temp) {
temp = temp s[i]
if (length(temp) > 2) {
for (k in UrlEncoding)
if (temp == UrlEncoding[k]) {
r = r k
temp = NULLSTR
break
}
if (temp) {
r = r temp
temp = NULLSTR
}
}
} else {
if (s[i] != "%")
r = r s[i]
else
temp = s[i]
}
if (temp)
r = r temp
return r
}
# Initialize `UriSchemes`.
function initUriSchemes() {
UriSchemes[0] = "file://"
UriSchemes[1] = "http://"
UriSchemes[2] = "https://"
}
## System:
# Read from a file and return its content.
function readFrom(file, line, text) {
if (!file) file = "/dev/stdin"
text = NULLSTR
while (getline line < file)
text = (text ? text "\n" : NULLSTR) line
return text
}
# Write text to file.
function writeTo(text, file) {
if (!file) file = "/dev/stdout"
print text > file
}
# Return the output of a command.
function getOutput(command, content, line) {
content = NULLSTR
while ((command |& getline line) > 0)
content = (content ? content "\n" : NULLSTR) line
close(command)
return content
}
# Return non-zero if file exists; otherwise return 0.
function fileExists(file) {
return !system("test -f " parameterize(file))
}
# Return non-zero if file exists and is a directory; otherwise return 0.
function dirExists(file) {
return !system("test -d " parameterize(file))
}
# Detect whether a program exists in path.
# Return the name (or output) if the program call writes anything to stdout;
# Otherwise, return a null string.
function detectProgram(prog, arg, returnOutput, command, temp) {
command = prog " " arg SUPERR
command | getline temp
close(command)
if (returnOutput)
return temp
if (temp)
return prog
return NULLSTR
}
# Return the HEAD revision if the current directory is a git repo;
# Otherwise return a null string.
function getGitHead( line, group) {
if (fileExists(".git/HEAD")) {
getline line < ".git/HEAD"
match(line, /^ref: (.*)$/, group)
if (fileExists(".git/" group[1])) {
getline line < (".git/" group[1])
return substr(line, 1, 7)
} else
return NULLSTR
} else
return NULLSTR
}
BEGIN {
initConst()
initAnsiCode()
initUrlEncoding()
initUriSchemes()
}
================================================
FILE: include/Help.awk
================================================
####################################################################
# Help.awk #
####################################################################
# Return version as a string.
function getVersion( build, gitHead) {
initAudioPlayer()
initPager()
Platform = Platform ? Platform : detectProgram("uname", "-s", 1)
if (ENVIRON["TRANS_BUILD"])
build = "-" ENVIRON["TRANS_BUILD"]
else {
gitHead = getGitHead()
build = gitHead ? "-git:" gitHead : ""
}
return ansi("bold", sprintf("%-22s%s%s\n\n", Name, Version, build)) \
sprintf("%-22s%s\n", "platform", Platform) \
sprintf("%-22s%s\n", "terminal type", ENVIRON["TERM"]) \
sprintf("%-22s%s\n", "bi-di emulator", BiDiTerm ? BiDiTerm :
"[N/A]") \
sprintf("%-22s%s\n", "gawk (GNU Awk)", PROCINFO["version"]) \
sprintf("%s\n", FriBidi ? FriBidi :
"fribidi (GNU FriBidi) [NOT INSTALLED]") \
sprintf("%-22s%s\n", "audio player", AudioPlayer ? AudioPlayer :
"[NOT INSTALLED]") \
sprintf("%-22s%s\n", "terminal pager", Pager ? Pager :
"[NOT INSTALLED]") \
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", "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"]) \
sprintf("%-22s%s\n", "proxy", Option["proxy"] ? Option["proxy"] :
"[NONE]") \
sprintf("%-22s%s\n", "user-agent", Option["user-agent"] ? Option["user-agent"] :
"[NONE]") \
sprintf("%-22s%s\n", "ip version", Option["ip-version"] ? Option["ip-version"] :
"[DEFAULT]") \
sprintf("%-22s%s\n", "theme", Option["theme"]) \
sprintf("%-22s%s\n", "init file", InitScript ? InitScript : "[NONE]") \
sprintf("\n%-22s%s", "Report bugs to:", "https://github.com/soimort/translate-shell/issues")
}
# Return help message as a string.
function getHelp() {
return "Usage: " ansi("bold", Command) \
" [" ansi("underline", "OPTIONS") "]" \
" [" ansi("underline", "SOURCES") "]" \
":[" ansi("underline", "TARGETS") "]" \
" [" ansi("underline", "TEXT") "]..." RS \
RS "Information options:" RS \
ins(1, ansi("bold", "-V") ", " ansi("bold", "-version")) RS \
ins(2, "Print version and exit.") RS \
ins(1, ansi("bold", "-H") ", " ansi("bold", "-help")) RS \
ins(2, "Print help message and exit.") RS \
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 (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 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 \
ins(1, ansi("bold", "-e ") ansi("underline", "ENGINE") \
", " ansi("bold", "-engine ") ansi("underline", "ENGINE")) RS \
ins(2, "Specify the translation engine to use.") RS \
RS "Display options:" RS \
ins(1, ansi("bold", "-verbose")) RS \
ins(2, "Verbose mode. (default)") RS \
ins(1, ansi("bold", "-b") ", " ansi("bold", "-brief")) RS \
ins(2, "Brief mode.") RS \
ins(1, ansi("bold", "-d") ", " ansi("bold", "-dictionary")) RS \
ins(2, "Dictionary mode.") RS \
ins(1, ansi("bold", "-identify")) RS \
ins(2, "Language identification.") RS \
ins(1, ansi("bold", "-show-original ") ansi("underline", "Y/n")) RS \
ins(2, "Show original text or not.") RS \
ins(1, ansi("bold", "-show-original-phonetics ") ansi("underline", "Y/n")) RS \
ins(2, "Show phonetic notation of original text or not.") RS \
ins(1, ansi("bold", "-show-translation ") ansi("underline", "Y/n")) RS \
ins(2, "Show translation or not.") RS \
ins(1, ansi("bold", "-show-translation-phonetics ") ansi("underline", "Y/n")) RS \
ins(2, "Show phonetic notation of translation or not.") RS \
ins(1, ansi("bold", "-show-prompt-message ") ansi("underline", "Y/n")) RS \
ins(2, "Show prompt message or not.") RS \
ins(1, ansi("bold", "-show-languages ") ansi("underline", "Y/n")) RS \
ins(2, "Show source and target languages or not.") RS \
ins(1, ansi("bold", "-show-original-dictionary ") ansi("underline", "y/N")) RS \
ins(2, "Show dictionary entry of original text or not.") RS \
ins(1, ansi("bold", "-show-dictionary ") ansi("underline", "Y/n")) RS \
ins(2, "Show dictionary entry of translation or not.") RS \
ins(1, ansi("bold", "-show-alternatives ") ansi("underline", "Y/n")) RS \
ins(2, "Show alternative translations or not.") RS \
ins(1, ansi("bold", "-w ") ansi("underline", "NUM") \
", " ansi("bold", "-width ") ansi("underline", "NUM")) RS \
ins(2, "Specify the screen width for padding.") RS \
ins(1, ansi("bold", "-indent ") ansi("underline", "NUM")) RS \
ins(2, "Specify the size of indent (number of spaces).") RS \
ins(1, ansi("bold", "-theme ") ansi("underline", "FILENAME")) RS \
ins(2, "Specify the theme to use.") RS \
ins(1, ansi("bold", "-no-theme")) RS \
ins(2, "Do not use any other theme than default.") RS \
ins(1, ansi("bold", "-no-ansi")) RS \
ins(2, "Do not use ANSI escape codes.") RS \
ins(1, ansi("bold", "-no-autocorrect")) RS \
ins(2, "Do not autocorrect. (if defaulted by the translation engine)") RS \
ins(1, ansi("bold", "-no-bidi")) RS \
ins(2, "Do not convert bidirectional texts.") RS \
ins(1, ansi("bold", "-bidi")) RS \
ins(2, "Always convert bidirectional texts.") RS \
ins(1, ansi("bold", "-no-warn")) RS \
ins(2, "Do not write warning messages to stderr.") RS \
ins(1, ansi("bold", "-dump")) RS \
ins(2, "Print raw API response instead.") RS \
RS "Audio options:" RS \
ins(1, ansi("bold", "-p, -play")) RS \
ins(2, "Listen to the translation.") RS \
ins(1, ansi("bold", "-speak")) RS \
ins(2, "Listen to the original text.") RS \
ins(1, ansi("bold", "-n ") ansi("underline", "VOICE") \
", " ansi("bold", "-narrator ") ansi("underline", "VOICE")) RS \
ins(2, "Specify the narrator, and listen to the translation.") RS \
ins(1, ansi("bold", "-player ") ansi("underline", "PROGRAM")) RS \
ins(2, "Specify the audio player to use, and listen to the translation.") RS \
ins(1, ansi("bold", "-no-play")) RS \
ins(2, "Do not listen to the translation.") RS \
ins(1, ansi("bold", "-no-translate")) RS \
ins(2, "Do not translate anything when using -speak.") RS \
ins(1, ansi("bold", "-download-audio")) RS \
ins(2, "Download the audio to the current directory.") RS \
ins(1, ansi("bold", "-download-audio-as ") ansi("underline", "FILENAME")) RS \
ins(2, "Download the audio to the specified file.") RS \
RS "Terminal paging and browsing options:" RS \
ins(1, ansi("bold", "-v") ", " ansi("bold", "-view")) RS \
ins(2, "View the translation in a terminal pager.") RS \
ins(1, ansi("bold", "-pager ") ansi("underline", "PROGRAM")) RS \
ins(2, "Specify the terminal pager to use, and view the translation.") RS \
ins(1, ansi("bold", "-no-view") ", " ansi("bold", "-no-pager")) RS \
ins(2, "Do not view the translation in a terminal pager.") RS \
ins(1, ansi("bold", "-browser ") ansi("underline", "PROGRAM")) RS \
ins(2, "Specify the web browser to use.") RS \
ins(1, ansi("bold", "-no-browser")) RS \
ins(2, "Do not open the web browser.") RS \
RS "Networking options:" RS \
ins(1, ansi("bold", "-x ") ansi("underline", "HOST:PORT") \
", " ansi("bold", "-proxy ") ansi("underline", "HOST:PORT")) RS \
ins(2, "Use HTTP proxy on given port.") RS \
ins(1, ansi("bold", "-u ") ansi("underline", "STRING") \
", " ansi("bold", "-user-agent ") ansi("underline", "STRING")) RS \
ins(2, "Specify the User-Agent to identify as.") RS \
ins(1, ansi("bold", "-4") ", " ansi("bold", "-ipv4") \
", " ansi("bold", "-inet4-only")) RS \
ins(2, "Connect only to IPv4 addresses.") RS \
ins(1, ansi("bold", "-6") ", " ansi("bold", "-ipv6") \
", " ansi("bold", "-inet6-only")) RS \
ins(2, "Connect only to IPv6 addresses.") RS \
RS "Interactive shell options:" RS \
ins(1, ansi("bold", "-I") ", " ansi("bold", "-interactive") ", " ansi("bold", "-shell")) RS \
ins(2, "Start an interactive shell.") RS \
ins(1, ansi("bold", "-E") ", " ansi("bold", "-emacs")) RS \
ins(2, "Start the GNU Emacs front-end for an interactive shell.") RS \
ins(1, ansi("bold", "-no-rlwrap")) RS \
ins(2, "Do not invoke rlwrap when starting an interactive shell.") RS \
RS "I/O options:" RS \
ins(1, ansi("bold", "-i ") ansi("underline", "FILENAME") \
", " ansi("bold", "-input ") ansi("underline", "FILENAME")) RS \
ins(2, "Specify the input file.") RS \
ins(1, ansi("bold", "-o ") ansi("underline", "FILENAME") \
", " ansi("bold", "-output ") ansi("underline", "FILENAME")) RS \
ins(2, "Specify the output file.") RS \
RS "Language preference options:" 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") \
", " ansi("bold", "-from ") ansi("underline", "CODES")) RS \
ins(2, "Specify the source language(s), joined by '+'.") RS \
ins(1, ansi("bold", "-t ") ansi("underline", "CODES") \
", " ansi("bold", "-tl ") ansi("underline", "CODES") \
", " ansi("bold", "-target ") ansi("underline", "CODES") \
", " ansi("bold", "-to ") ansi("underline", "CODES")) RS \
ins(2, "Specify the target language(s), joined by '+'.") RS \
RS "Text preprocessing options:" RS \
ins(1, ansi("bold", "-j") ", " ansi("bold", "-join-sentence")) RS \
ins(2, "Treat all arguments as one single sentence.") RS \
RS "Other options:" RS \
ins(1, ansi("bold", "-no-init")) RS \
ins(2, "Do not load any initialization script.") RS \
RS "See the man page " Command "(1) for more information."
}
# Show man page.
function showMan( temp) {
if (ENVIRON["TRANS_MANPAGE"]) {
initPager()
Groff = detectProgram("groff", "--version")
if (Pager && Groff) {
temp = "echo -E \"${TRANS_MANPAGE}\""
temp = temp PIPE \
Groff " -Wall -mtty-char -mandoc -Tutf8 " \
"-rLL=" Option["width"] "n -rLT=" Option["width"] "n"
switch (Pager) {
case "less":
temp = temp PIPE \
Pager " -s -P\"\\ \\Manual page " Command "(1) line %lt (press h for help or q to quit)\""
break
case "most":
temp = temp PIPE Pager " -Cs"
break
default: # more
temp = temp PIPE Pager
}
system(temp)
return
}
}
if (fileExists(ENVIRON["TRANS_DIR"] "/man/" Command ".1"))
system("man " parameterize(ENVIRON["TRANS_DIR"] "/man/" Command ".1") SUPERR)
else if (system("man " Command SUPERR))
print getHelp()
}
# Return a reference table of languages as a string.
# Parameters:
# displayName = "endonym" or "name"
function getReference(displayName,
####
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) {
# 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) {
# only show languages that are supported
if (Locale[code]["supported-by"]) {
col = int(i / rows)
append(cols[col], code)
i++
}
}
PROCINFO["sorted_in"] = saveSortedIn
if (displayName == "endonym") {
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 "└" 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) "┘"
}
} else {
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 "└" replicate("─", 25) "┴" replicate("─", 25) "┴" replicate("─", 25) "┘"
}
}
return r
}
# Return detailed information of languages as a string.
function getLanguage(codes, code, i, r, saveSortedIn) {
r = NULLSTR
if (!isarray(codes))
r = getDetails(codes)
else if (anything(codes)) {
saveSortedIn = PROCINFO["sorted_in"]
PROCINFO["sorted_in"] = "@ind_num_asc"
for (i in codes)
r = (r ? r RS prettify("target-seperator", replicate(Option["chr-target-seperator"], Option["width"])) RS \
: r) getDetails(codes[i])
PROCINFO["sorted_in"] = saveSortedIn
} else
r = getDetails(Option["hl"])
return r
}
================================================
FILE: include/LanguageData.awk
================================================
####################################################################
# LanguageData.awk #
####################################################################
# Initialize all locales supported.
# Mostly ISO 639-1 codes, with a few ISO 639-3 codes.
# "family" : Language family (from Glottolog)
# "iso" : ISO 639-3 code
# "glotto" : Glottocode
# "script" : Writing system (ISO 15924 script code)
# See: <https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>
# <https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes>
# <https://en.wikipedia.org/wiki/ISO_15924#List_of_codes>
# <http://glottolog.org/>
function initLocale() {
# Afrikaans
Locale["af"]["name"] = "Afrikaans"
Locale["af"]["endonym"] = "Afrikaans"
Locale["af"]["translations-of"] = "Vertalings van %s"
Locale["af"]["definitions-of"] = "Definisies van %s"
Locale["af"]["synonyms"] = "Sinonieme"
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"
# 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"
# Amharic
Locale["am"]["name"] = "Amharic"
Locale["am"]["endonym"] = "አማርኛ"
Locale["am"]["translations-of"] = "የ %s ትርጉሞች"
Locale["am"]["definitions-of"] = "የ %s ቃላት ፍችዎች"
Locale["am"]["synonyms"] = "ተመሳሳይ ቃላት"
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"
# Arabic (Modern Standard Arabic)
Locale["ar"]["name"] = "Arabic"
Locale["ar"]["endonym"] = "العربية"
Locale["ar"]["translations-of"] = "ترجمات %s"
Locale["ar"]["definitions-of"] = "تعريفات %s"
Locale["ar"]["synonyms"] = "مرادفات"
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"
# Armenian (Eastern Armenian)
Locale["hy"]["name"] = "Armenian"
Locale["hy"]["endonym"] = "Հայերեն"
Locale["hy"]["translations-of"] = "%s-ի թարգմանությունները"
Locale["hy"]["definitions-of"] = "%s-ի սահմանումները"
Locale["hy"]["synonyms"] = "Հոմանիշներ"
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"
# 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"
Locale["az"]["synonyms"] = "Sinonimlər"
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"
# Basque
Locale["eu"]["name"] = "Basque"
Locale["eu"]["endonym"] = "Euskara"
Locale["eu"]["translations-of"] = "%s esapidearen itzulpena"
Locale["eu"]["definitions-of"] = "Honen definizioak: %s"
Locale["eu"]["synonyms"] = "Sinonimoak"
Locale["eu"]["examples"] = "Adibideak"
Locale["eu"]["see-also"] = "Ikusi hauek ere"
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"
# Belarusian, Cyrillic alphabet
Locale["be"]["name"] = "Belarusian"
Locale["be"]["endonym"] = "беларуская"
Locale["be"]["translations-of"] = "Пераклады %s"
Locale["be"]["definitions-of"] = "Вызначэннi %s"
Locale["be"]["synonyms"] = "Сінонімы"
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"
# Bengali / Bangla
Locale["bn"]["name"] = "Bengali"
Locale["bn"]["name2"] = "Bangla"
Locale["bn"]["endonym"] = "বাংলা"
Locale["bn"]["translations-of"] = "%s এর অনুবাদ"
Locale["bn"]["definitions-of"] = "%s এর সংজ্ঞা"
Locale["bn"]["synonyms"] = "প্রতিশব্দ"
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"
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"
Locale["bs"]["definitions-of"] = "Definicije za %s"
Locale["bs"]["synonyms"] = "Sinonimi"
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"] = ""
# Bulgarian
Locale["bg"]["name"] = "Bulgarian"
Locale["bg"]["endonym"] = "български"
Locale["bg"]["translations-of"] = "Преводи на %s"
Locale["bg"]["definitions-of"] = "Дефиниции за %s"
Locale["bg"]["synonyms"] = "Синоними"
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"
# Catalan (Standard Catalan)
Locale["ca"]["name"] = "Catalan"
Locale["ca"]["endonym"] = "Català"
Locale["ca"]["translations-of"] = "Traduccions per a %s"
Locale["ca"]["definitions-of"] = "Definicions de: %s"
Locale["ca"]["synonyms"] = "Sinònims"
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"
# Cebuano
Locale["ceb"]["name"] = "Cebuano"
Locale["ceb"]["endonym"] = "Cebuano"
Locale["ceb"]["translations-of"] = "%s Mga Paghubad sa PULONG_O_HUGPONG SA PAMULONG"
Locale["ceb"]["definitions-of"] = "Mga kahulugan sa %s"
Locale["ceb"]["synonyms"] = "Mga Kapulong"
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"] = ""
# 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"
Locale["ny"]["synonyms"] = "Mau ofanana"
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"
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的定义"
Locale["zh-CN"]["synonyms"] = "同义词"
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
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
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"
Locale["co"]["definitions-of"] = "Définitions de %s"
Locale["co"]["synonyms"] = "Synonymes"
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"] = "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"
# Croatian
Locale["hr"]["name"] = "Croatian"
Locale["hr"]["endonym"] = "Hrvatski"
Locale["hr"]["translations-of"] = "Prijevodi riječi ili izraza %s"
Locale["hr"]["definitions-of"] = "Definicije riječi ili izraza %s"
Locale["hr"]["synonyms"] = "Sinonimi"
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"
# Czech
Locale["cs"]["name"] = "Czech"
Locale["cs"]["endonym"] = "Čeština"
Locale["cs"]["translations-of"] = "Překlad výrazu %s"
Locale["cs"]["definitions-of"] = "Definice výrazu %s"
Locale["cs"]["synonyms"] = "Synonyma"
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"
# Danish
Locale["da"]["name"] = "Danish"
Locale["da"]["endonym"] = "Dansk"
Locale["da"]["translations-of"] = "Oversættelser af %s"
Locale["da"]["definitions-of"] = "Definitioner af %s"
Locale["da"]["synonyms"] = "Synonymer"
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"
# 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"
Locale["nl"]["definitions-of"] = "Definities van %s"
Locale["nl"]["synonyms"] = "Synoniemen"
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"] = ""
# English
Locale["en"]["name"] = "English"
Locale["en"]["endonym"] = "English"
Locale["en"]["translations-of"] = "Translations of %s"
Locale["en"]["definitions-of"] = "Definitions of %s"
Locale["en"]["synonyms"] = "Synonyms"
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"
# Esperanto
Locale["eo"]["name"] = "Esperanto"
Locale["eo"]["endonym"] = "Esperanto"
Locale["eo"]["translations-of"] = "Tradukoj de %s"
Locale["eo"]["definitions-of"] = "Difinoj de %s"
Locale["eo"]["synonyms"] = "Sinonimoj"
Locale["eo"]["examples"] = "Ekzemploj"
Locale["eo"]["see-also"] = "Vidu ankaŭ"
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"
# Estonian
Locale["et"]["name"] = "Estonian"
Locale["et"]["endonym"] = "Eesti"
Locale["et"]["translations-of"] = "Sõna(de) %s tõlked"
Locale["et"]["definitions-of"] = "Sõna(de) %s definitsioonid"
Locale["et"]["synonyms"] = "Sünonüümid"
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"
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"] = "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"]["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"
# Finnish
Locale["fi"]["name"] = "Finnish"
Locale["fi"]["endonym"] = "Suomi"
Locale["fi"]["translations-of"] = "Käännökset tekstille %s"
Locale["fi"]["definitions-of"] = "Määritelmät kohteelle %s"
Locale["fi"]["synonyms"] = "Synonyymit"
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"
# French (Standard French)
Locale["fr"]["name"] = "French"
Locale["fr"]["endonym"] = "Français"
Locale["fr"]["translations-of"] = "Traductions de %s"
Locale["fr"]["definitions-of"] = "Définitions de %s"
Locale["fr"]["synonyms"] = "Synonymes"
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
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"
Locale["gl"]["definitions-of"] = "Definicións de %s"
Locale["gl"]["synonyms"] = "Sinónimos"
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"
# Georgian (Modern Georgian)
Locale["ka"]["name"] = "Georgian"
Locale["ka"]["endonym"] = "ქართული"
Locale["ka"]["translations-of"] = "%s-ის თარგმანები"
Locale["ka"]["definitions-of"] = "%s-ის განსაზღვრებები"
Locale["ka"]["synonyms"] = "სინონიმები"
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"
# German (Standard German)
Locale["de"]["name"] = "German"
Locale["de"]["endonym"] = "Deutsch"
Locale["de"]["translations-of"] = "Übersetzungen für %s"
Locale["de"]["definitions-of"] = "Definitionen von %s"
Locale["de"]["synonyms"] = "Synonyme"
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"
# Greek (Modern Greek)
Locale["el"]["name"] = "Greek"
Locale["el"]["endonym"] = "Ελληνικά"
Locale["el"]["translations-of"] = "Μεταφράσεις του %s"
Locale["el"]["definitions-of"] = "Όρισμοί %s"
Locale["el"]["synonyms"] = "Συνώνυμα"
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"
# Gujarati
Locale["gu"]["name"] = "Gujarati"
Locale["gu"]["endonym"] = "ગુજરાતી"
Locale["gu"]["translations-of"] = "%s ના અનુવાદ"
Locale["gu"]["definitions-of"] = "%s ની વ્યાખ્યાઓ"
Locale["gu"]["synonyms"] = "સમાનાર્થી"
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"
# Haitian Creole
Locale["ht"]["name"] = "Haitian Creole"
Locale["ht"]["endonym"] = "Kreyòl Ayisyen"
Locale["ht"]["translations-of"] = "Tradiksyon %s"
Locale["ht"]["definitions-of"] = "Definisyon nan %s"
Locale["ht"]["synonyms"] = "Sinonim"
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"
# Hawaiian
Locale["haw"]["name"] = "Hawaiian"
Locale["haw"]["endonym"] = "ʻŌlelo Hawaiʻi"
#Locale["haw"]["translations-of"]
#Locale["haw"]["definitions-of"]
#Locale["haw"]["synonyms"]
#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"
# Hausa, Latin alphabet
Locale["ha"]["name"] = "Hausa"
Locale["ha"]["endonym"] = "Hausa"
Locale["ha"]["translations-of"] = "Fassarar %s"
Locale["ha"]["definitions-of"] = "Ma'anoni na %s"
Locale["ha"]["synonyms"] = "Masu kamancin ma'ana"
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"
# Hebrew
Locale["he"]["name"] = "Hebrew"
Locale["he"]["endonym"] = "עִבְרִית"
Locale["he"]["translations-of"] = "תרגומים של %s"
Locale["he"]["definitions-of"] = "הגדרות של %s"
Locale["he"]["synonyms"] = "מילים נרדפות"
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"
# Hindi
Locale["hi"]["name"] = "Hindi"
Locale["hi"]["endonym"] = "हिन्दी"
Locale["hi"]["translations-of"] = "%s के अनुवाद"
Locale["hi"]["definitions-of"] = "%s की परिभाषाएं"
Locale["hi"]["synonyms"] = "समानार्थी"
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"
# Hmong (First Vernacular Hmong)
Locale["hmn"]["name"] = "Hmong"
Locale["hmn"]["endonym"] = "Hmoob"
Locale["hmn"]["translations-of"] = "Lus txhais: %s"
#Locale["hmn"]["definitions-of"]
#Locale["hmn"]["synonyms"]
#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"
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"
Locale["hu"]["definitions-of"] = "%s jelentései"
Locale["hu"]["synonyms"] = "Szinonimák"
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"
# Icelandic
Locale["is"]["name"] = "Icelandic"
Locale["is"]["endonym"] = "Íslenska"
Locale["is"]["translations-of"] = "Þýðingar á %s"
Locale["is"]["definitions-of"] = "Skilgreiningar á"
Locale["is"]["synonyms"] = "Samheiti"
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"
# Igbo
Locale["ig"]["name"] = "Igbo"
Locale["ig"]["endonym"] = "Igbo"
Locale["ig"]["translations-of"] = "Ntụgharị asụsụ nke %s"
Locale["ig"]["definitions-of"] = "Nkọwapụta nke %s"
Locale["ig"]["synonyms"] = "Okwu oyiri"
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"
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"
Locale["id"]["definitions-of"] = "Definisi %s"
Locale["id"]["synonyms"] = "Sinonim"
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"
# 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"
Locale["ga"]["synonyms"] = "Comhchiallaigh"
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"
# Italian
Locale["it"]["name"] = "Italian"
Locale["it"]["endonym"] = "Italiano"
Locale["it"]["translations-of"] = "Traduzioni di %s"
Locale["it"]["definitions-of"] = "Definizioni di %s"
Locale["it"]["synonyms"] = "Sinonimi"
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"
# Japanese
Locale["ja"]["name"] = "Japanese"
Locale["ja"]["endonym"] = "日本語"
Locale["ja"]["translations-of"] = "「%s」の翻訳"
Locale["ja"]["definitions-of"] = "%s の定義"
Locale["ja"]["synonyms"] = "同義語"
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"
# Javanese, Latin alphabet
Locale["jv"]["name"] = "Javanese"
Locale["jv"]["endonym"] = "Basa Jawa"
Locale["jv"]["translations-of"] = "Terjemahan %s"
Locale["jv"]["definitions-of"] = "Arti %s"
Locale["jv"]["synonyms"] = "Sinonim"
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"
# Kannada (Modern Kannada)
Locale["kn"]["name"] = "Kannada"
Locale["kn"]["endonym"] = "ಕನ್ನಡ"
Locale["kn"]["translations-of"] = "%s ನ ಅನುವಾದಗಳು"
Locale["kn"]["definitions-of"] = "%s ನ ವ್ಯಾಖ್ಯಾನಗಳು"
Locale["kn"]["synonyms"] = "ಸಮಾನಾರ್ಥಕಗಳು"
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"
# Kazakh, Cyrillic alphabet
Locale["kk"]["name"] = "Kazakh"
Locale["kk"]["endonym"] = "Қазақ тілі"
Locale["kk"]["translations-of"] = "%s аудармалары"
Locale["kk"]["definitions-of"] = "%s анықтамалары"
Locale["kk"]["synonyms"] = "Синонимдер"
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"
# Khmer (Central Khmer)
Locale["km"]["name"] = "Khmer"
Locale["km"]["endonym"] = "ភាសាខ្មែរ"
Locale["km"]["translations-of"] = "ការបកប្រែនៃ %s"
Locale["km"]["definitions-of"] = "និយមន័យនៃ %s"
Locale["km"]["synonyms"] = "សទិសន័យ"
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"
# Kinyarwanda
Locale["rw"]["name"] = "Kinyarwanda"
Locale["rw"]["endonym"] = "Ikinyarwanda"
#Locale["rw"]["translations-of"]
#Locale["rw"]["definitions-of"]
#Locale["rw"]["synonyms"]
#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"
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의 번역"
Locale["ko"]["definitions-of"] = "%s의 정의"
Locale["ko"]["synonyms"] = "동의어"
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
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"]
#Locale["ku"]["synonyms"]
#Locale["ku"]["examples"]
#Locale["ku"]["see-also"]
Locale["ku"]["family"] = "Indo-European"
Locale["ku"]["branch"] = "Iranian"
Locale["ku"]["iso"] = "kmr"
Locale["ku"]["glotto"] = "nort2641"
Locale["ku"]["script"] = "Latn"
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 котормосу"
Locale["ky"]["definitions-of"] = "%s аныктамасы"
Locale["ky"]["synonyms"] = "Синонимдер"
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"
# Lao
Locale["lo"]["name"] = "Lao"
Locale["lo"]["endonym"] = "ລາວ"
Locale["lo"]["translations-of"] = "ຄຳແປສຳລັບ %s"
Locale["lo"]["definitions-of"] = "ຄວາມໝາຍຂອງ %s"
Locale["lo"]["synonyms"] = "ຄຳທີ່ຄ້າຍກັນ %s"
Locale["lo"]["examples"] = "ຕົວຢ່າງ"
Locale["lo"]["see-also"] = "ເບິ່ງເພີ່ມເຕີມ"
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"
# Latin
Locale["la"]["name"] = "Latin"
Locale["la"]["endonym"] = "Latina"
Locale["la"]["translations-of"] = "Versio de %s"
#Locale["la"]["definitions-of"]
#Locale["la"]["synonyms"]
#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"
# Latvian
Locale["lv"]["name"] = "Latvian"
Locale["lv"]["endonym"] = "Latviešu"
Locale["lv"]["translations-of"] = "%s tulkojumi"
Locale["lv"]["definitions-of"] = "%s definīcijas"
Locale["lv"]["synonyms"] = "Sinonīmi"
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"
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"
Locale["lt"]["definitions-of"] = "„%s“ apibrėžimai"
Locale["lt"]["synonyms"] = "Sinonimai"
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"
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"]
#Locale["lb"]["definitions-of"]
#Locale["lb"]["synonyms"]
#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"
# Macedonian
Locale["mk"]["name"] = "Macedonian"
Locale["mk"]["endonym"] = "Македонски"
Locale["mk"]["translations-of"] = "Преводи на %s"
Locale["mk"]["definitions-of"] = "Дефиниции на %s"
Locale["mk"]["synonyms"] = "Синоними"
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"
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"
Locale["mg"]["definitions-of"] = "Famaritana ny %s"
Locale["mg"]["synonyms"] = "Mitovy hevitra"
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"
# Malay (Standard Malay), Latin alphabet
Locale["ms"]["name"] = "Malay"
Locale["ms"]["endonym"] = "Bahasa Melayu"
Locale["ms"]["translations-of"] = "Terjemahan %s"
Locale["ms"]["definitions-of"] = "Takrif %s"
Locale["ms"]["synonyms"] = "Sinonim"
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"
# Malayalam
Locale["ml"]["name"] = "Malayalam"
Locale["ml"]["endonym"] = "മലയാളം"
Locale["ml"]["translations-of"] = "%s എന്നതിന്റെ വിവർത്തനങ്ങൾ"
Locale["ml"]["definitions-of"] = "%s എന്നതിന്റെ നിർവ്വചനങ്ങൾ"
Locale["ml"]["synonyms"] = "പര്യായങ്ങള്"
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"
# Maltese
Locale["mt"]["name"] = "Maltese"
Locale["mt"]["endonym"] = "Malti"
Locale["mt"]["translations-of"] = "Traduzzjonijiet ta' %s"
Locale["mt"]["definitions-of"] = "Definizzjonijiet ta' %s"
Locale["mt"]["synonyms"] = "Sinonimi"
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"
# Maori
Locale["mi"]["name"] = "Maori"
Locale["mi"]["endonym"] = "Māori"
Locale["mi"]["translations-of"] = "Ngā whakamāoritanga o %s"
Locale["mi"]["definitions-of"] = "Ngā whakamārama o %s"
Locale["mi"]["synonyms"] = "Ngā Kupu Taurite"
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"
# Marathi
Locale["mr"]["name"] = "Marathi"
Locale["mr"]["endonym"] = "मराठी"
Locale["mr"]["translations-of"] = "%s ची भाषांतरे"
Locale["mr"]["definitions-of"] = "%s च्या व्याख्या"
Locale["mr"]["synonyms"] = "समानार्थी शब्द"
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"
# 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-н орчуулга"
Locale["mn"]["definitions-of"] = "%s үгийн тодорхойлолт"
Locale["mn"]["synonyms"] = "Ойролцоо утгатай"
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"
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"] = "မြန်မာစာ"
Locale["my"]["translations-of"] = "%s၏ ဘာသာပြန်ဆိုချက်များ"
Locale["my"]["definitions-of"] = "%s၏ အနက်ဖွင့်ဆိုချက်များ"
Locale["my"]["synonyms"] = "ကြောင်းတူသံကွဲများ"
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"
# Nepali
Locale["ne"]["name"] = "Nepali"
Locale["ne"]["endonym"] = "नेपाली"
Locale["ne"]["translations-of"] = "%sका अनुवाद"
Locale["ne"]["definitions-of"] = "%sको परिभाषा"
Locale["ne"]["synonyms"] = "समानार्थीहरू"
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"
# Norwegian
Locale["no"]["name"] = "Norwegian"
Locale["no"]["endonym"] = "Norsk"
Locale["no"]["translations-of"] = "Oversettelser av %s"
Locale["no"]["definitions-of"] = "Definisjoner av %s"
Locale["no"]["synonyms"] = "Synonymer"
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"]
gitextract_1wfg4je5/ ├── .circleci/ │ └── config.yml ├── .github/ │ └── workflows/ │ └── ci.yml ├── .gitignore ├── .gitmodules ├── .travis.yml ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── README.template.md ├── WAIVER ├── build.awk ├── google-translate-mode.el ├── include/ │ ├── Commons.awk │ ├── Help.awk │ ├── LanguageData.awk │ ├── LanguageHelper.awk │ ├── Main.awk │ ├── Parser.awk │ ├── REPL.awk │ ├── Script.awk │ ├── Theme.awk │ ├── Translate.awk │ ├── TranslatorInterface.awk │ ├── Translators/ │ │ ├── Apertium.awk │ │ ├── Auto.awk │ │ ├── BingTranslator.awk │ │ ├── GoogleTranslate.awk │ │ ├── SpellChecker.awk │ │ ├── YandexTranslate.awk │ │ └── _.awk │ └── Utils.awk ├── man/ │ ├── trans.1 │ ├── trans.1.md │ └── trans.1.template.md ├── metainfo.awk ├── test/ │ ├── Test.awk │ ├── TestCommons.awk │ ├── TestLanguageHelper.awk │ ├── TestParser.awk │ └── TestUtils.awk ├── test.awk ├── translate ├── translate-shell.plugin.zsh └── translate.awk
Condensed preview — 46 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (488K chars).
[
{
"path": ".circleci/config.yml",
"chars": 478,
"preview": "version: 2\njobs:\n build:\n environment:\n LC_ALL: C.UTF-8\n LANG: C.UTF-8\n docker:\n - image: cimg/bas"
},
{
"path": ".github/workflows/ci.yml",
"chars": 380,
"preview": "name: CI\n\non:\n push:\n branches:\n - develop\n - stable\n pull_request:\n branches:\n - develop\n\njobs:\n buil"
},
{
"path": ".gitignore",
"chars": 53,
"preview": "/_*\n/build\n/gh-pages\n/registry\n/wiki\n*.emacs*\n*.html\n"
},
{
"path": ".gitmodules",
"chars": 107,
"preview": "[submodule \"translate-shell.wiki\"]\n\tpath = wiki\n\turl = https://github.com/soimort/translate-shell.wiki.git\n"
},
{
"path": ".travis.yml",
"chars": 784,
"preview": "os:\n - linux\n - osx\n\nbefore_install: |\n if [[ \"$TRAVIS_OS_NAME\" == \"linux\" ]]; then sudo add-apt-repository ppa:schot"
},
{
"path": "CONTRIBUTING.md",
"chars": 868,
"preview": "## How to Report an Issue\n\n1. For bugs and suggestions, please always **[report your issue on GitHub](https://github.com"
},
{
"path": "Dockerfile",
"chars": 315,
"preview": "FROM alpine:latest\nMAINTAINER soimort\n\nRUN echo \"http://dl-cdn.alpinelinux.org/alpine/edge/testing\" >> /etc/apk/reposito"
},
{
"path": "LICENSE",
"chars": 1211,
"preview": "This is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, c"
},
{
"path": "Makefile",
"chars": 1115,
"preview": "NAME = \"translate-shell\"\nCOMMAND = trans\nBUILDDIR ?= build\nMANDIR = man\n\nTARGET ?= bash\nPREFIX ?= /usr/local\n"
},
{
"path": "README.md",
"chars": 35407,
"preview": "# Translate Shell\n\n[](https:/"
},
{
"path": "README.template.md",
"chars": 14051,
"preview": "# Translate Shell\n\n[](https:/"
},
{
"path": "WAIVER",
"chars": 883,
"preview": "# Copyright waiver for <https://github.com/soimort/translate-shell>\n\nI dedicate any and all copyright interest in this s"
},
{
"path": "build.awk",
"chars": 11707,
"preview": "#!/usr/bin/gawk -f\n\n# Not all 4.x versions of gawk can handle @include without \".awk\" extension\n# But the build.awk scri"
},
{
"path": "google-translate-mode.el",
"chars": 2142,
"preview": ";;; google-translate-mode.el --- Google Translate minor mode\n\n;; This file is distributed as part of translate-shell\n;; "
},
{
"path": "include/Commons.awk",
"chars": 16615,
"preview": "####################################################################\n# Commons.awk "
},
{
"path": "include/Help.awk",
"chars": 27780,
"preview": "####################################################################\n# Help.awk "
},
{
"path": "include/LanguageData.awk",
"chars": 132898,
"preview": "####################################################################\n# LanguageData.awk "
},
{
"path": "include/LanguageHelper.awk",
"chars": 13085,
"preview": "####################################################################\n# LanguageHelper.awk "
},
{
"path": "include/Main.awk",
"chars": 27170,
"preview": "####################################################################\n# Main.awk "
},
{
"path": "include/Parser.awk",
"chars": 10794,
"preview": "####################################################################\n# Parser.awk "
},
{
"path": "include/REPL.awk",
"chars": 7092,
"preview": "####################################################################\n# REPL.awk "
},
{
"path": "include/Script.awk",
"chars": 2394,
"preview": "####################################################################\n# Script.awk "
},
{
"path": "include/Theme.awk",
"chars": 6297,
"preview": "####################################################################\n# Theme.awk "
},
{
"path": "include/Translate.awk",
"chars": 15673,
"preview": "####################################################################\n# Translate.awk "
},
{
"path": "include/TranslatorInterface.awk",
"chars": 2269,
"preview": "####################################################################\n# TranslatorInterface.awk "
},
{
"path": "include/Translators/Apertium.awk",
"chars": 4139,
"preview": "####################################################################\n# Apertium.awk "
},
{
"path": "include/Translators/Auto.awk",
"chars": 1995,
"preview": "####################################################################\n# Auto.awk "
},
{
"path": "include/Translators/BingTranslator.awk",
"chars": 16877,
"preview": "####################################################################\n# BingTranslator.awk "
},
{
"path": "include/Translators/GoogleTranslate.awk",
"chars": 21951,
"preview": "####################################################################\n# GoogleTranslate.awk "
},
{
"path": "include/Translators/SpellChecker.awk",
"chars": 3107,
"preview": "####################################################################\n# SpellChecker.awk "
},
{
"path": "include/Translators/YandexTranslate.awk",
"chars": 11303,
"preview": "####################################################################\n# YandexTranslate.awk "
},
{
"path": "include/Translators/_.awk",
"chars": 284,
"preview": "@include \"include/Translators/GoogleTranslate.awk\"\n@include \"include/Translators/BingTranslator.awk\"\n@include \"include/T"
},
{
"path": "include/Utils.awk",
"chars": 8053,
"preview": "####################################################################\n# Utils.awk "
},
{
"path": "man/trans.1",
"chars": 12641,
"preview": ".\\\" Automatically generated by Pandoc 2.5\n.\\\"\n.TH \"TRANS\" \"1\" \"2023\\-02\\-08\" \"0.9.7.1\" \"\"\n.hy\n.SH NAME\n.PP\ntrans \\- Comm"
},
{
"path": "man/trans.1.md",
"chars": 10542,
"preview": "% TRANS(1) 0.9.7.1\n% Mort Yao <soi@mort.ninja>\n% 2023-02-08\n\n# NAME\n\ntrans - Command-line translator using Google Transl"
},
{
"path": "man/trans.1.template.md",
"chars": 10547,
"preview": "% TRANS(1) $Version$\n% Mort Yao <soi@mort.ninja>\n% $ReleaseDate$\n\n# NAME\n\ntrans - Command-line translator using Google T"
},
{
"path": "metainfo.awk",
"chars": 303,
"preview": "BEGIN {\n Name = \"Translate Shell\"\n Description = \"Command-line translator using Google Translate, Bing Tran"
},
{
"path": "test/Test.awk",
"chars": 116,
"preview": "@include \"test/TestCommons\"\n@include \"test/TestUtils\"\n@include \"test/TestParser\"\n@include \"test/TestLanguageHelper\"\n"
},
{
"path": "test/TestCommons.awk",
"chars": 7395,
"preview": "BEGIN {\n START_TEST(\"Commons.awk\")\n\n # Arrays\n T(\"anything()\", 3)\n {\n delete something\n assert"
},
{
"path": "test/TestLanguageHelper.awk",
"chars": 471,
"preview": "@include \"include/LanguageData\"\n@include \"include/LanguageHelper\"\n\nBEGIN {\n START_TEST(\"LanguageHelper.awk\")\n\n T(\""
},
{
"path": "test/TestParser.awk",
"chars": 4270,
"preview": "@include \"include/Parser\"\n\nBEGIN {\n START_TEST(\"Parser.awk\")\n\n T(\"tokenize()\", 8)\n {\n delete tokens\n "
},
{
"path": "test/TestUtils.awk",
"chars": 2215,
"preview": "@include \"include/Utils\"\n\nBEGIN {\n START_TEST(\"Utils.awk\")\n\n T(\"GawkVersion\", 1)\n {\n initGawk()\n "
},
{
"path": "test.awk",
"chars": 2292,
"preview": "#!/usr/bin/gawk -f\n@include \"include/Commons\"\n\nfunction pass(name, message, ansiCode, string) {\n if (!name) name ="
},
{
"path": "translate",
"chars": 915,
"preview": "#!/bin/sh\nexport TRANS_DIR=`dirname $0`\ngawk \\\n-i \"${TRANS_DIR}/metainfo.awk\" \\\n-i \"${TRANS_DIR}/include/Commons.awk\" \\\n"
},
{
"path": "translate-shell.plugin.zsh",
"chars": 57,
"preview": "#!/usr/bin/env zsh\nalias trans=\"$(dirname $0)/translate\"\n"
},
{
"path": "translate.awk",
"chars": 465,
"preview": "#!/usr/bin/gawk -f\n\n@include \"metainfo.awk\"\n\n@include \"include/Commons.awk\"\n@include \"include/Utils.awk\"\n\n@include \"incl"
}
]
About this extraction
This page contains the full source code of the soimort/translate-shell GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 46 files (440.9 KB), approximately 125.0k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.