• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.circleci/H11-May-2020-2120

.github/workflows/H11-May-2020-2318

include/H03-May-2022-6,8595,330

man/H11-May-2020-1,136869

test/H11-May-2020-494436

wiki/H11-May-2020-

.gitignoreH A D11-May-202053 87

.gitmodulesH A D11-May-2020107 43

.travis.ymlH A D11-May-2020784 1815

CONTRIBUTING.mdH A D11-May-2020921 2011

DockerfileH A D11-May-2020315 129

LICENSEH A D11-May-20201.2 KiB2520

MakefileH A D11-May-20201.1 KiB4432

README.mdH A D11-May-202030.9 KiB573402

README.template.mdH A D11-May-202013.7 KiB366215

WAIVERH A D11-May-2020883 1814

build.awkH A D11-May-202011.3 KiB365283

google-translate-mode.elH A D11-May-20202.1 KiB7554

metainfo.awkH A D11-May-2020304 109

test.awkH A D11-May-20202.2 KiB7662

translateH A D11-May-2020816 2119

translate-shell.plugin.zshH A D11-May-202057 31

translate.awkH A D11-May-2020424 2113

README.md

1# Translate Shell
2
3[![Icon](https://raw.githubusercontent.com/soimort/translate-shell/gh-pages/images/icon.png)](https://www.soimort.org/translate-shell)
4[![CircleCI](https://circleci.com/gh/soimort/translate-shell.svg?style=svg)](https://circleci.com/gh/soimort/translate-shell)
5[![Actions](https://github.com/soimort/translate-shell/workflows/CI/badge.svg)](https://github.com/soimort/translate-shell/actions)
6[![Version](https://raw.githubusercontent.com/soimort/translate-shell/gh-pages/images/badge-release.png)](https://github.com/soimort/translate-shell/releases)
7[![Download](https://raw.githubusercontent.com/soimort/translate-shell/gh-pages/images/badge-download.png)](https://www.soimort.org/translate-shell/trans)
8[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/soimort/translate-shell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
9
10**[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:
11
12```
13$ trans 'Saluton, Mondo!'
14Saluton, Mondo!
15
16Hello, World!
17
18Translations of Saluton, Mondo!
19[ Esperanto -> English ]
20Saluton ,
21    Hello,
22Mondo !
23    World!
24```
25
26By default, translations with detailed explanations are shown. You can also translate the text briefly: (only the most relevant translation will be shown)
27
28```
29$ trans -brief 'Saluton, Mondo!'
30Hello, World!
31```
32
33**Translate Shell** can also be used like an interactive shell; input the text to be translated line by line:
34
35```
36$ trans -shell -brief
37> Rien ne réussit comme le succès.
38Nothing succeeds like success.
39> Was mich nicht umbringt, macht mich stärker.
40What does not kill me makes me stronger.
41> Юмор есть остроумие глубокого чувства.
42Humor has a deep sense of wit.
43> 學而不思則罔,思而不學則殆。
44Learning without thought is labor lost, thought without learning is perilous.
45> 幸福になるためには、人から愛されるのが一番の近道。
46In order to be happy, the best way is to be loved by people.
47```
48
49## Prerequisites
50
51### System Requirements
52
53**Translate Shell** is known to work on many POSIX-compliant systems, including but not limited to:
54
55* GNU/Linux
56* macOS
57* *BSD
58* Android (through Termux)
59* Windows (through WSL, Cygwin, or MSYS2)
60
61### Dependencies
62
63* **[GNU Awk](https://www.gnu.org/software/gawk/)** (**gawk**) **4.0 or later**
64    * 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).
65    * How to get gawk:
66      * gawk comes with all GNU/Linux distributions.
67      * On FreeBSD, gawk is available in the ports.
68      * On macOS, gawk is available in MacPorts and Homebrew.
69* **[GNU Bash](http://www.gnu.org/software/bash/)** or **[Zsh](http://www.zsh.org/)**
70    * 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.
71
72### Recommended Dependencies
73
74These dependencies are optional, but strongly recommended for full functionality:
75
76* **[curl](http://curl.haxx.se/)** with **OpenSSL** support
77* **[GNU FriBidi](http://fribidi.org/)**: _an implementation of the Unicode Bidirectional Algorithm (bidi)_
78    * required for displaying text in Right-to-Left scripts (e.g. Arabic, Hebrew)
79* **[mplayer](http://www.mplayerhq.hu/)**, **[mpv](http://mpv.io/)**, **[mpg123](http://mpg123.org/)**, or **[eSpeak](http://espeak.sourceforge.net/)**
80    * required for the Text-to-Speech functionality
81* **[less](http://www.greenwoodsoftware.com/less/)**, **[more](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/more.html)** or **[most](http://www.jedsoft.org/most/)**
82    * required for terminal paging
83* **[rlwrap](http://utopia.knoware.nl/~hlub/uck/rlwrap/#rlwrap)**: *a GNU readline wrapper*
84    * required for readline-style editing and history in the interactive shell
85* **[aspell](http://aspell.net/)** or **[hunspell](http://hunspell.github.io/)**
86    * required for spell checking
87
88### Environment and Fonts
89
90It 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.
91
92## Try It Out!
93
94Start an interactive shell and translate anything you input into your native language: (in **bash** or **zsh**)
95
96    $ gawk -f <(curl -Ls git.io/translate) -- -shell
97
98(in **fish**)
99
100    $ gawk -f (curl -Ls git.io/translate | psub) -- -shell
101
102### Using Docker
103
104To try out via [Docker](https://www.docker.com/), run:
105
106    $ docker pull soimort/translate-shell
107
108Then you may start an interactive shell from the Docker image for translating:
109
110    $ docker run -it soimort/translate-shell -shell
111
112## Installation
113
114### Option #1. Direct Download
115
116Download [the self-contained executable](http://git.io/trans) and place it into your path. It's everything you need.
117
118    $ wget git.io/trans
119    $ chmod +x ./trans
120
121There is a [GPG signature](https://www.soimort.org/translate-shell/trans.sig).
122
123### Option #2. From A Package Manager
124
125#### Using your favorite package manager
126
127See **[wiki: Distros](https://github.com/soimort/translate-shell/wiki/Distros)** on how to install from a specific package manager on your distro.
128
129#### Using [Antigen](https://github.com/zsh-users/antigen) (for Zsh users)
130
131Add the following line to your `.zshrc`:
132
133    antigen bundle soimort/translate-shell
134
135### Option #3. From Git
136
137    $ git clone https://github.com/soimort/translate-shell
138    $ cd translate-shell/
139    $ make
140    $ [sudo] make install
141
142In case you have only zsh but not bash in your system, build with:
143
144    $ make TARGET=zsh
145
146The default `PREFIX` of installation is `/usr/local`. To install the program to somewhere else (e.g. `/usr`, `~/.local`), use:
147
148    $ [sudo] make PREFIX=/usr install
149
150## Getting Started by Examples
151
152### Translate a Word
153
154#### From any language to your language
155
156Google 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`.
157
158    $ trans vorto
159
160#### From any language to one or more specific languages
161
162Translate a word into French:
163
164    $ trans :fr word
165
166Translate a word into Chinese and Japanese: (use a plus sign "`+`" as the delimiter)
167
168    $ trans :zh+ja word
169
170Alternatively, 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:
171
172    $ trans {=zh+ja} word
173    $ trans '=zh+ja' word
174
175You can also use the `-target` (`-t`) option to specify the target language(s):
176
177    $ trans -t zh+ja word
178
179With the `-t` option, the name of the language may also be used instead of the language code:
180
181    $ trans -t japanese word
182    $ trans -t 日本語 word
183
184#### From a specific language
185
186Google Translate may wrongly identify the source text as some other language than you expected:
187
188    $ trans 手紙
189
190In that case, you need to specify its language explicitly:
191
192    $ trans ja: 手紙
193    $ trans zh: 手紙
194
195You can also use the `-source` (`-s`) option to specify the source language:
196
197    $ trans -s ja 手紙
198
199### Translate Multiple Words or a Phrase
200
201Translate each word alone:
202
203    $ trans en:zh word processor
204
205Put words into one argument, and translate them as a whole:
206
207    $ trans en:zh "word processor"
208
209### Translate a Sentence
210
211Translating a sentence is much the same like translating a phrase; you can just quote the sentence into one argument:
212
213    $ trans :zh "To-morrow, and to-morrow, and to-morrow,"
214    $ trans :zh 'To-morrow, and to-morrow, and to-morrow,'
215
216It is also possible to translate multi-line sentences:
217
218    $ trans :zh "Creeps in this petty pace from day to day,
219    > To the last syllable of recorded time;
220    > And all our yesterdays have lighted fools
221    > The way to dusty death."
222
223To avoid punctuation marks (e.g. "`!`") or other special characters being interpreted by the shell, use *single quotes*:
224
225    $ trans :zh 'Out, out, brief candle!'
226
227There are some cases though, you may still want to use *double quotes*: (e.g. the sentence contains a single quotation mark "`'`")
228
229    $ trans :zh "Life's but a walking shadow, a poor player"
230
231Alternatively, use the `-join-sentence` (`-j`) option to treat all arguments as one sentence so that quotes can be omitted:
232
233    $ trans -j :zh Life\'s but a walking shadow, a poor player
234
235### Brief Mode
236
237By 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:
238
239    $ trans -b :fr "Saluton, Mondo"
240
241In brief mode, phonetic notation (if any) is not shown by default. To enable this, put an at sign "`@`" in front of the language code:
242
243    $ trans -b :@ja "Saluton, Mondo"
244
245### Dictionary Mode
246
247Google 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:
248
249    $ trans :en word
250
251To enable dictionary mode no matter whether the source language and the target language are identical, use the `-dictionary` (`-d`) option.
252
253    $ trans -d fr: mot
254
255**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.
256
257### Language Identification
258
259Use the `-identify` (`-id`) option to identify the language of the text:
260
261    $ trans -id 言葉
262
263### Text-to-Speech
264
265Use the `-play` (`-p`) option to listen to the translation:
266
267    $ trans -b -p :ja "Saluton, Mondo"
268
269Use the `-speak` (`-sp`) option to listen to the original text:
270
271    $ trans -sp "你好,世界"
272
273### Terminal Paging
274
275Sometimes 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`:
276
277    $ trans -d -v word
278
279### Right-to-Left (RTL) Languages
280
281[Right-to-Left (RTL) languages](http://en.wikipedia.org/wiki/Right-to-left) are well supported via [GNU FriBidi](http://fribidi.org/).
282
283The 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:
284
285    $ trans -b -w 40 :he "Saluton, Mondo"
286
287See **[wiki: Languages](https://github.com/soimort/translate-shell/wiki/Languages)** to find out which language(s) uses a Right-to-Left writing system.
288
289### Pipeline, Input and Output
290
291If 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:
292
293    $ echo "Saluton, Mondo" | trans -b :fr
294    $ trans -b -i input.txt :fr
295
296Translations are written to standard output, or to the file specified by the `-output` (`-o`) option:
297
298    $ echo "Saluton, Mondo" | trans -b -o output.txt :fr
299
300### Translate a File
301
302Instead 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:
303
304    $ trans :fr file://input.txt
305
306**Note**: Brief mode is used when translating from file URI schemes.
307
308### Translate a Web Page
309
310To translate a web page, an http(s) URI scheme can be used as an argument:
311
312    $ trans :fr http://www.w3.org/
313
314A 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:
315
316    $ trans -browser firefox :fr http://www.w3.org/
317
318### Language Details
319
320Use the `-list` (`-L`) option to view details of one or more languages:
321
322    $ trans -L fr
323    $ trans -L de+en
324
325Some 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.
326
327### Interactive Translate Shell (REPL)
328
329Start an interactive shell using the `-shell` (or `-interactive`, `-I`) option:
330
331    $ trans -shell
332
333You may specify the source language and the target language(s) before starting an interactive shell:
334
335    $ trans -shell en:fr
336
337You 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.
338
339## Usage
340
341For 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.
342
343```
344Usage:  trans [OPTIONS] [SOURCES]:[TARGETS] [TEXT]...
345
346Information options:
347    -V, -version
348        Print version and exit.
349    -H, -help
350        Print help message and exit.
351    -M, -man
352        Show man page and exit.
353    -T, -reference
354        Print reference table of languages and exit.
355    -R, -reference-english
356        Print reference table of languages (in English names) and exit.
357    -L CODES, -list CODES
358        Print details of languages and exit.
359    -S, -list-engines
360        List available translation engines and exit.
361    -U, -upgrade
362        Check for upgrade of this program.
363
364Translator options:
365    -e ENGINE, -engine ENGINE
366        Specify the translation engine to use.
367
368Display options:
369    -verbose
370        Verbose mode. (default)
371    -b, -brief
372        Brief mode.
373    -d, -dictionary
374        Dictionary mode.
375    -identify
376        Language identification.
377    -show-original Y/n
378        Show original text or not.
379    -show-original-phonetics Y/n
380        Show phonetic notation of original text or not.
381    -show-translation Y/n
382        Show translation or not.
383    -show-translation-phonetics Y/n
384        Show phonetic notation of translation or not.
385    -show-prompt-message Y/n
386        Show prompt message or not.
387    -show-languages Y/n
388        Show source and target languages or not.
389    -show-original-dictionary y/N
390        Show dictionary entry of original text or not.
391    -show-dictionary Y/n
392        Show dictionary entry of translation or not.
393    -show-alternatives Y/n
394        Show alternative translations or not.
395    -w NUM, -width NUM
396        Specify the screen width for padding.
397    -indent NUM
398        Specify the size of indent (number of spaces).
399    -theme FILENAME
400        Specify the theme to use.
401    -no-theme
402        Do not use any other theme than default.
403    -no-ansi
404        Do not use ANSI escape codes.
405    -no-autocorrect
406        Do not autocorrect. (if defaulted by the translation engine)
407    -no-bidi
408        Do not convert bidirectional texts.
409    -bidi
410        Always convert bidirectional texts.
411    -no-warn
412        Do not write warning messages to stderr.
413    -dump
414        Print raw API response instead.
415
416Audio options:
417    -p, -play
418        Listen to the translation.
419    -speak
420        Listen to the original text.
421    -n VOICE, -narrator VOICE
422        Specify the narrator, and listen to the translation.
423    -player PROGRAM
424        Specify the audio player to use, and listen to the translation.
425    -no-play
426        Do not listen to the translation.
427    -no-translate
428        Do not translate anything when using -speak.
429    -download-audio
430        Download the audio to the current directory.
431    -download-audio-as FILENAME
432        Download the audio to the specified file.
433
434Terminal paging and browsing options:
435    -v, -view
436        View the translation in a terminal pager.
437    -pager PROGRAM
438        Specify the terminal pager to use, and view the translation.
439    -no-view, -no-pager
440        Do not view the translation in a terminal pager.
441    -browser PROGRAM
442        Specify the web browser to use.
443    -no-browser
444        Do not open the web browser.
445
446Networking options:
447    -x HOST:PORT, -proxy HOST:PORT
448        Use HTTP proxy on given port.
449    -u STRING, -user-agent STRING
450        Specify the User-Agent to identify as.
451    -4, -ipv4, -inet4-only
452        Connect only to IPv4 addresses.
453    -6, -ipv6, -inet6-only
454        Connect only to IPv6 addresses.
455
456Interactive shell options:
457    -I, -interactive, -shell
458        Start an interactive shell.
459    -E, -emacs
460        Start the GNU Emacs front-end for an interactive shell.
461    -no-rlwrap
462        Do not invoke rlwrap when starting an interactive shell.
463
464I/O options:
465    -i FILENAME, -input FILENAME
466        Specify the input file.
467    -o FILENAME, -output FILENAME
468        Specify the output file.
469
470Language preference options:
471    -l CODE, -hl CODE, -lang CODE
472        Specify your home language.
473    -s CODES, -sl CODES, -source CODES, -from CODES
474        Specify the source language(s), joined by '+'.
475    -t CODES, -tl CODES, -target CODES, -to CODES
476        Specify the target language(s), joined by '+'.
477
478Text preprocessing options:
479    -j, -join-sentence
480        Treat all arguments as one single sentence.
481
482Other options:
483    -no-init
484        Do not load any initialization script.
485
486See the man page trans(1) for more information.
487```
488
489## Code List
490
491Use `trans -R` or `trans -T` to view the reference table in a terminal.
492
493For more details on languages and corresponding codes, see **[wiki: Languages](https://github.com/soimort/translate-shell/wiki/Languages)**.
494
495| Language | Code | Language | Code | Language | Code |
496| :------: | :--: | :------: | :--: | :------: | :--: |
497| **[Afrikaans](http://en.wikipedia.org/wiki/Afrikaans_language)** <br/> **Afrikaans** | **`af`** | **[Hebrew](http://en.wikipedia.org/wiki/Hebrew_language)** <br/> **עִבְרִית** | **`he`** | **[Portuguese](http://en.wikipedia.org/wiki/Portuguese_language)** <br/> **Português** | **`pt`** |
498| **[Albanian](http://en.wikipedia.org/wiki/Albanian_language)** <br/> **Shqip** | **`sq`** | **[Hill Mari](http://en.wikipedia.org/wiki/Hill_Mari)** <br/> **Кырык мары** | **`mrj`** | **[Punjabi](http://en.wikipedia.org/wiki/Punjabi_language)** <br/> **ਪੰਜਾਬੀ** | **`pa`** |
499| **[Amharic](http://en.wikipedia.org/wiki/Amharic_language)** <br/> **አማርኛ** | **`am`** | **[Hindi](http://en.wikipedia.org/wiki/Hindi_language)** <br/> **हिन्दी** | **`hi`** | **[Querétaro Otomi](http://en.wikipedia.org/wiki/Querétaro_Otomi)** <br/> **Hñąñho** | **`otq`** |
500| **[Arabic](http://en.wikipedia.org/wiki/Arabic_language)** <br/> **العربية** | **`ar`** | **[Hmong](http://en.wikipedia.org/wiki/Hmong_language)** <br/> **Hmoob** | **`hmn`** | **[Romanian](http://en.wikipedia.org/wiki/Romanian_language)** <br/> **Română** | **`ro`** |
501| **[Armenian](http://en.wikipedia.org/wiki/Armenian_language)** <br/> **Հայերեն** | **`hy`** | **[Hmong Daw](http://en.wikipedia.org/wiki/Hmong_Daw)** <br/> **Hmoob Daw** | **`mww`** | **[Russian](http://en.wikipedia.org/wiki/Russian_language)** <br/> **Русский** | **`ru`** |
502| **[Azerbaijani](http://en.wikipedia.org/wiki/Azerbaijani_language)** <br/> **Azərbaycanca** | **`az`** | **[Hungarian](http://en.wikipedia.org/wiki/Hungarian_language)** <br/> **Magyar** | **`hu`** | **[Samoan](http://en.wikipedia.org/wiki/Samoan_language)** <br/> **Gagana Sāmoa** | **`sm`** |
503| **[Bashkir](http://en.wikipedia.org/wiki/Bashkir_language)** <br/> **башҡорт теле** | **`ba`** | **[Icelandic](http://en.wikipedia.org/wiki/Icelandic_language)** <br/> **Íslenska** | **`is`** | **[Scots Gaelic](http://en.wikipedia.org/wiki/Scots_Gaelic)** <br/> **Gàidhlig** | **`gd`** |
504| **[Basque](http://en.wikipedia.org/wiki/Basque_language)** <br/> **Euskara** | **`eu`** | **[Igbo](http://en.wikipedia.org/wiki/Igbo_language)** <br/> **Igbo** | **`ig`** | **[Serbian (Cyrillic)](http://en.wikipedia.org/wiki/Serbian_(Cyrillic))** <br/> **српски** | **`sr-Cyrl`** |
505| **[Belarusian](http://en.wikipedia.org/wiki/Belarusian_language)** <br/> **беларуская** | **`be`** | **[Indonesian](http://en.wikipedia.org/wiki/Indonesian_language)** <br/> **Bahasa Indonesia** | **`id`** | **[Serbian (Latin)](http://en.wikipedia.org/wiki/Serbian_(Latin))** <br/> **srpski** | **`sr-Latn`** |
506| **[Bengali](http://en.wikipedia.org/wiki/Bengali_language)** <br/> **বাংলা** | **`bn`** | **[Irish](http://en.wikipedia.org/wiki/Irish_language)** <br/> **Gaeilge** | **`ga`** | **[Sesotho](http://en.wikipedia.org/wiki/Sesotho_language)** <br/> **Sesotho** | **`st`** |
507| **[Bosnian](http://en.wikipedia.org/wiki/Bosnian_language)** <br/> **Bosanski** | **`bs`** | **[Italian](http://en.wikipedia.org/wiki/Italian_language)** <br/> **Italiano** | **`it`** | **[Shona](http://en.wikipedia.org/wiki/Shona_language)** <br/> **chiShona** | **`sn`** |
508| **[Bulgarian](http://en.wikipedia.org/wiki/Bulgarian_language)** <br/> **български** | **`bg`** | **[Japanese](http://en.wikipedia.org/wiki/Japanese_language)** <br/> **日本語** | **`ja`** | **[Sindhi](http://en.wikipedia.org/wiki/Sindhi_language)** <br/> **سنڌي** | **`sd`** |
509| **[Cantonese](http://en.wikipedia.org/wiki/Cantonese_language)** <br/> **粵語** | **`yue`** | **[Javanese](http://en.wikipedia.org/wiki/Javanese_language)** <br/> **Basa Jawa** | **`jv`** | **[Sinhala](http://en.wikipedia.org/wiki/Sinhala_language)** <br/> **සිංහල** | **`si`** |
510| **[Catalan](http://en.wikipedia.org/wiki/Catalan_language)** <br/> **Català** | **`ca`** | **[Kannada](http://en.wikipedia.org/wiki/Kannada_language)** <br/> **ಕನ್ನಡ** | **`kn`** | **[Slovak](http://en.wikipedia.org/wiki/Slovak_language)** <br/> **Slovenčina** | **`sk`** |
511| **[Cebuano](http://en.wikipedia.org/wiki/Cebuano_language)** <br/> **Cebuano** | **`ceb`** | **[Kazakh](http://en.wikipedia.org/wiki/Kazakh_language)** <br/> **Қазақ тілі** | **`kk`** | **[Slovenian](http://en.wikipedia.org/wiki/Slovenian_language)** <br/> **Slovenščina** | **`sl`** |
512| **[Chichewa](http://en.wikipedia.org/wiki/Chichewa_language)** <br/> **Nyanja** | **`ny`** | **[Khmer](http://en.wikipedia.org/wiki/Khmer_language)** <br/> **ភាសាខ្មែរ** | **`km`** | **[Somali](http://en.wikipedia.org/wiki/Somali_language)** <br/> **Soomaali** | **`so`** |
513| **[Chinese Simplified](http://en.wikipedia.org/wiki/Chinese_Simplified)** <br/> **简体中文** | **`zh-CN`** | **[Klingon](http://en.wikipedia.org/wiki/Klingon_language)** <br/> **tlhIngan Hol** | **`tlh`** | **[Spanish](http://en.wikipedia.org/wiki/Spanish_language)** <br/> **Español** | **`es`** |
514| **[Chinese Traditional](http://en.wikipedia.org/wiki/Chinese_Traditional)** <br/> **正體中文** | **`zh-TW`** | **[Klingon (pIqaD)](http://en.wikipedia.org/wiki/Klingon_(pIqaD))** <br/> ** ** | **`tlh-Qaak`** | **[Sundanese](http://en.wikipedia.org/wiki/Sundanese_language)** <br/> **Basa Sunda** | **`su`** |
515| **[Corsican](http://en.wikipedia.org/wiki/Corsican_language)** <br/> **Corsu** | **`co`** | **[Korean](http://en.wikipedia.org/wiki/Korean_language)** <br/> **한국어** | **`ko`** | **[Swahili](http://en.wikipedia.org/wiki/Swahili_language)** <br/> **Kiswahili** | **`sw`** |
516| **[Croatian](http://en.wikipedia.org/wiki/Croatian_language)** <br/> **Hrvatski** | **`hr`** | **[Kurdish](http://en.wikipedia.org/wiki/Kurdish_language)** <br/> **Kurdî** | **`ku`** | **[Swedish](http://en.wikipedia.org/wiki/Swedish_language)** <br/> **Svenska** | **`sv`** |
517| **[Czech](http://en.wikipedia.org/wiki/Czech_language)** <br/> **Čeština** | **`cs`** | **[Kyrgyz](http://en.wikipedia.org/wiki/Kyrgyz_language)** <br/> **Кыргызча** | **`ky`** | **[Tahitian](http://en.wikipedia.org/wiki/Tahitian_language)** <br/> **Reo Tahiti** | **`ty`** |
518| **[Danish](http://en.wikipedia.org/wiki/Danish_language)** <br/> **Dansk** | **`da`** | **[Lao](http://en.wikipedia.org/wiki/Lao_language)** <br/> **ລາວ** | **`lo`** | **[Tajik](http://en.wikipedia.org/wiki/Tajik_language)** <br/> **Тоҷикӣ** | **`tg`** |
519| **[Dutch](http://en.wikipedia.org/wiki/Dutch_language)** <br/> **Nederlands** | **`nl`** | **[Latin](http://en.wikipedia.org/wiki/Latin_language)** <br/> **Latina** | **`la`** | **[Tamil](http://en.wikipedia.org/wiki/Tamil_language)** <br/> **தமிழ்** | **`ta`** |
520| **[Eastern Mari](http://en.wikipedia.org/wiki/Eastern_Mari)** <br/> **Олык марий** | **`mhr`** | **[Latvian](http://en.wikipedia.org/wiki/Latvian_language)** <br/> **Latviešu** | **`lv`** | **[Tatar](http://en.wikipedia.org/wiki/Tatar_language)** <br/> **татарча** | **`tt`** |
521| **[Emoji](http://en.wikipedia.org/wiki/Emoji_language)** <br/> **Emoji** | **`emj`** | **[Lithuanian](http://en.wikipedia.org/wiki/Lithuanian_language)** <br/> **Lietuvių** | **`lt`** | **[Telugu](http://en.wikipedia.org/wiki/Telugu_language)** <br/> **తెలుగు** | **`te`** |
522| **[English](http://en.wikipedia.org/wiki/English_language)** <br/> **English** | **`en`** | **[Luxembourgish](http://en.wikipedia.org/wiki/Luxembourgish_language)** <br/> **Lëtzebuergesch** | **`lb`** | **[Thai](http://en.wikipedia.org/wiki/Thai_language)** <br/> **ไทย** | **`th`** |
523| **[Esperanto](http://en.wikipedia.org/wiki/Esperanto_language)** <br/> **Esperanto** | **`eo`** | **[Macedonian](http://en.wikipedia.org/wiki/Macedonian_language)** <br/> **Македонски** | **`mk`** | **[Tongan](http://en.wikipedia.org/wiki/Tongan_language)** <br/> **Lea faka-Tonga** | **`to`** |
524| **[Estonian](http://en.wikipedia.org/wiki/Estonian_language)** <br/> **Eesti** | **`et`** | **[Malagasy](http://en.wikipedia.org/wiki/Malagasy_language)** <br/> **Malagasy** | **`mg`** | **[Turkish](http://en.wikipedia.org/wiki/Turkish_language)** <br/> **Türkçe** | **`tr`** |
525| **[Fijian](http://en.wikipedia.org/wiki/Fijian_language)** <br/> **Vosa Vakaviti** | **`fj`** | **[Malay](http://en.wikipedia.org/wiki/Malay_language)** <br/> **Bahasa Melayu** | **`ms`** | **[Udmurt](http://en.wikipedia.org/wiki/Udmurt_language)** <br/> **удмурт** | **`udm`** |
526| **[Filipino](http://en.wikipedia.org/wiki/Filipino_language)** <br/> **Tagalog** | **`tl`** | **[Malayalam](http://en.wikipedia.org/wiki/Malayalam_language)** <br/> **മലയാളം** | **`ml`** | **[Ukrainian](http://en.wikipedia.org/wiki/Ukrainian_language)** <br/> **Українська** | **`uk`** |
527| **[Finnish](http://en.wikipedia.org/wiki/Finnish_language)** <br/> **Suomi** | **`fi`** | **[Maltese](http://en.wikipedia.org/wiki/Maltese_language)** <br/> **Malti** | **`mt`** | **[Urdu](http://en.wikipedia.org/wiki/Urdu_language)** <br/> **اُردُو** | **`ur`** |
528| **[French](http://en.wikipedia.org/wiki/French_language)** <br/> **Français** | **`fr`** | **[Maori](http://en.wikipedia.org/wiki/Maori_language)** <br/> **Māori** | **`mi`** | **[Uzbek](http://en.wikipedia.org/wiki/Uzbek_language)** <br/> **Oʻzbek tili** | **`uz`** |
529| **[Frisian](http://en.wikipedia.org/wiki/Frisian_language)** <br/> **Frysk** | **`fy`** | **[Marathi](http://en.wikipedia.org/wiki/Marathi_language)** <br/> **मराठी** | **`mr`** | **[Vietnamese](http://en.wikipedia.org/wiki/Vietnamese_language)** <br/> **Tiếng Việt** | **`vi`** |
530| **[Galician](http://en.wikipedia.org/wiki/Galician_language)** <br/> **Galego** | **`gl`** | **[Mongolian](http://en.wikipedia.org/wiki/Mongolian_language)** <br/> **Монгол** | **`mn`** | **[Welsh](http://en.wikipedia.org/wiki/Welsh_language)** <br/> **Cymraeg** | **`cy`** |
531| **[Georgian](http://en.wikipedia.org/wiki/Georgian_language)** <br/> **ქართული** | **`ka`** | **[Myanmar](http://en.wikipedia.org/wiki/Myanmar_language)** <br/> **မြန်မာစာ** | **`my`** | **[Xhosa](http://en.wikipedia.org/wiki/Xhosa_language)** <br/> **isiXhosa** | **`xh`** |
532| **[German](http://en.wikipedia.org/wiki/German_language)** <br/> **Deutsch** | **`de`** | **[Nepali](http://en.wikipedia.org/wiki/Nepali_language)** <br/> **नेपाली** | **`ne`** | **[Yiddish](http://en.wikipedia.org/wiki/Yiddish_language)** <br/> **ייִדיש** | **`yi`** |
533| **[Greek](http://en.wikipedia.org/wiki/Greek_language)** <br/> **Ελληνικά** | **`el`** | **[Norwegian](http://en.wikipedia.org/wiki/Norwegian_language)** <br/> **Norsk** | **`no`** | **[Yoruba](http://en.wikipedia.org/wiki/Yoruba_language)** <br/> **Yorùbá** | **`yo`** |
534| **[Gujarati](http://en.wikipedia.org/wiki/Gujarati_language)** <br/> **ગુજરાતી** | **`gu`** | **[Papiamento](http://en.wikipedia.org/wiki/Papiamento_language)** <br/> **Papiamentu** | **`pap`** | **[Yucatec Maya](http://en.wikipedia.org/wiki/Yucatec_Maya)** <br/> **Màaya T'àan** | **`yua`** |
535| **[Haitian Creole](http://en.wikipedia.org/wiki/Haitian_Creole)** <br/> **Kreyòl Ayisyen** | **`ht`** | **[Pashto](http://en.wikipedia.org/wiki/Pashto_language)** <br/> **پښتو** | **`ps`** | **[Zulu](http://en.wikipedia.org/wiki/Zulu_language)** <br/> **isiZulu** | **`zu`** |
536| **[Hausa](http://en.wikipedia.org/wiki/Hausa_language)** <br/> **Hausa** | **`ha`** | **[Persian](http://en.wikipedia.org/wiki/Persian_language)** <br/> **فارسی** | **`fa`** |
537| **[Hawaiian](http://en.wikipedia.org/wiki/Hawaiian_language)** <br/> **ʻŌlelo Hawaiʻi** | **`haw`** | **[Polish](http://en.wikipedia.org/wiki/Polish_language)** <br/> **Polski** | **`pl`** |
538
539
540## Wiki
541
542Lists of all languages, writing systems and fonts for reference:
543
544* **[Languages](https://github.com/soimort/translate-shell/wiki/Languages)**
545* **[Writing Systems and Fonts](https://github.com/soimort/translate-shell/wiki/Writing-Systems-and-Fonts)**
546
547The following pages demonstrate the advanced usage of **Translate Shell**:
548
549* **[REPL](https://github.com/soimort/translate-shell/wiki/REPL)**
550* **[Text Editor Integration](https://github.com/soimort/translate-shell/wiki/Text-Editor-Integration)**
551* **[Narrator Selection](https://github.com/soimort/translate-shell/wiki/Narrator-Selection)**
552* **[Configuration](https://github.com/soimort/translate-shell/wiki/Configuration)**
553* **[Themes](https://github.com/soimort/translate-shell/wiki/Themes)**
554* **[AppleScript](https://github.com/soimort/translate-shell/wiki/AppleScript)**
555
556Find out whether your Linux distribution has included **Translate Shell** in its official repository. If not, contribute one:
557
558* **[Distros](https://github.com/soimort/translate-shell/wiki/Distros)**
559
560Frequently Asked Questions, historical stuff, AWK coding style, etc.:
561
562* **[FAQ](https://github.com/soimort/translate-shell/wiki/FAQ)**
563* **[History](https://github.com/soimort/translate-shell/wiki/History)**
564* **[AWK Style Guide](https://github.com/soimort/translate-shell/wiki/AWK-Style-Guide)**
565
566## Reporting Bugs / Contributing
567
568Please review the [guidelines for contributing](https://github.com/soimort/translate-shell/blob/stable/CONTRIBUTING.md) before reporting an issue or sending a pull request.
569
570## Licensing
571
572This 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.
573

README.template.md

1# Translate Shell
2
3[![Icon](https://raw.githubusercontent.com/soimort/translate-shell/gh-pages/images/icon.png)](https://www.soimort.org/translate-shell)
4[![CircleCI](https://circleci.com/gh/soimort/translate-shell.svg?style=svg)](https://circleci.com/gh/soimort/translate-shell)
5[![Actions](https://github.com/soimort/translate-shell/workflows/CI/badge.svg)](https://github.com/soimort/translate-shell/actions)
6[![Version](https://raw.githubusercontent.com/soimort/translate-shell/gh-pages/images/badge-release.png)](https://github.com/soimort/translate-shell/releases)
7[![Download](https://raw.githubusercontent.com/soimort/translate-shell/gh-pages/images/badge-download.png)](https://www.soimort.org/translate-shell/trans)
8[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/soimort/translate-shell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
9
10**[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:
11
12```
13$ trans 'Saluton, Mondo!'
14Saluton, Mondo!
15
16Hello, World!
17
18Translations of Saluton, Mondo!
19[ Esperanto -> English ]
20Saluton ,
21    Hello,
22Mondo !
23    World!
24```
25
26By default, translations with detailed explanations are shown. You can also translate the text briefly: (only the most relevant translation will be shown)
27
28```
29$ trans -brief 'Saluton, Mondo!'
30Hello, World!
31```
32
33**Translate Shell** can also be used like an interactive shell; input the text to be translated line by line:
34
35```
36$ trans -shell -brief
37> Rien ne réussit comme le succès.
38Nothing succeeds like success.
39> Was mich nicht umbringt, macht mich stärker.
40What does not kill me makes me stronger.
41> Юмор есть остроумие глубокого чувства.
42Humor has a deep sense of wit.
43> 學而不思則罔,思而不學則殆。
44Learning without thought is labor lost, thought without learning is perilous.
45> 幸福になるためには、人から愛されるのが一番の近道。
46In order to be happy, the best way is to be loved by people.
47```
48
49## Prerequisites
50
51### System Requirements
52
53**Translate Shell** is known to work on many POSIX-compliant systems, including but not limited to:
54
55* GNU/Linux
56* macOS
57* *BSD
58* Android (through Termux)
59* Windows (through WSL, Cygwin, or MSYS2)
60
61### Dependencies
62
63* **[GNU Awk](https://www.gnu.org/software/gawk/)** (**gawk**) **4.0 or later**
64    * 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).
65    * How to get gawk:
66      * gawk comes with all GNU/Linux distributions.
67      * On FreeBSD, gawk is available in the ports.
68      * On macOS, gawk is available in MacPorts and Homebrew.
69* **[GNU Bash](http://www.gnu.org/software/bash/)** or **[Zsh](http://www.zsh.org/)**
70    * 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.
71
72### Recommended Dependencies
73
74These dependencies are optional, but strongly recommended for full functionality:
75
76* **[curl](http://curl.haxx.se/)** with **OpenSSL** support
77* **[GNU FriBidi](http://fribidi.org/)**: _an implementation of the Unicode Bidirectional Algorithm (bidi)_
78    * required for displaying text in Right-to-Left scripts (e.g. Arabic, Hebrew)
79* **[mplayer](http://www.mplayerhq.hu/)**, **[mpv](http://mpv.io/)**, **[mpg123](http://mpg123.org/)**, or **[eSpeak](http://espeak.sourceforge.net/)**
80    * required for the Text-to-Speech functionality
81* **[less](http://www.greenwoodsoftware.com/less/)**, **[more](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/more.html)** or **[most](http://www.jedsoft.org/most/)**
82    * required for terminal paging
83* **[rlwrap](http://utopia.knoware.nl/~hlub/uck/rlwrap/#rlwrap)**: *a GNU readline wrapper*
84    * required for readline-style editing and history in the interactive shell
85* **[aspell](http://aspell.net/)** or **[hunspell](http://hunspell.github.io/)**
86    * required for spell checking
87
88### Environment and Fonts
89
90It 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.
91
92## Try It Out!
93
94Start an interactive shell and translate anything you input into your native language: (in **bash** or **zsh**)
95
96    $ gawk -f <(curl -Ls git.io/translate) -- -shell
97
98(in **fish**)
99
100    $ gawk -f (curl -Ls git.io/translate | psub) -- -shell
101
102### Using Docker
103
104To try out via [Docker](https://www.docker.com/), run:
105
106    $ docker pull soimort/translate-shell
107
108Then you may start an interactive shell from the Docker image for translating:
109
110    $ docker run -it soimort/translate-shell -shell
111
112## Installation
113
114### Option #1. Direct Download
115
116Download [the self-contained executable](http://git.io/trans) and place it into your path. It's everything you need.
117
118    $ wget git.io/trans
119    $ chmod +x ./trans
120
121There is a [GPG signature](https://www.soimort.org/translate-shell/trans.sig).
122
123### Option #2. From A Package Manager
124
125#### Using your favorite package manager
126
127See **[wiki: Distros](https://github.com/soimort/translate-shell/wiki/Distros)** on how to install from a specific package manager on your distro.
128
129#### Using [Antigen](https://github.com/zsh-users/antigen) (for Zsh users)
130
131Add the following line to your `.zshrc`:
132
133    antigen bundle soimort/translate-shell
134
135### Option #3. From Git
136
137    $ git clone https://github.com/soimort/translate-shell
138    $ cd translate-shell/
139    $ make
140    $ [sudo] make install
141
142In case you have only zsh but not bash in your system, build with:
143
144    $ make TARGET=zsh
145
146The default `PREFIX` of installation is `/usr/local`. To install the program to somewhere else (e.g. `/usr`, `~/.local`), use:
147
148    $ [sudo] make PREFIX=/usr install
149
150## Getting Started by Examples
151
152### Translate a Word
153
154#### From any language to your language
155
156Google 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`.
157
158    $ trans vorto
159
160#### From any language to one or more specific languages
161
162Translate a word into French:
163
164    $ trans :fr word
165
166Translate a word into Chinese and Japanese: (use a plus sign "`+`" as the delimiter)
167
168    $ trans :zh+ja word
169
170Alternatively, 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:
171
172    $ trans {=zh+ja} word
173    $ trans '=zh+ja' word
174
175You can also use the `-target` (`-t`) option to specify the target language(s):
176
177    $ trans -t zh+ja word
178
179With the `-t` option, the name of the language may also be used instead of the language code:
180
181    $ trans -t japanese word
182    $ trans -t 日本語 word
183
184#### From a specific language
185
186Google Translate may wrongly identify the source text as some other language than you expected:
187
188    $ trans 手紙
189
190In that case, you need to specify its language explicitly:
191
192    $ trans ja: 手紙
193    $ trans zh: 手紙
194
195You can also use the `-source` (`-s`) option to specify the source language:
196
197    $ trans -s ja 手紙
198
199### Translate Multiple Words or a Phrase
200
201Translate each word alone:
202
203    $ trans en:zh word processor
204
205Put words into one argument, and translate them as a whole:
206
207    $ trans en:zh "word processor"
208
209### Translate a Sentence
210
211Translating a sentence is much the same like translating a phrase; you can just quote the sentence into one argument:
212
213    $ trans :zh "To-morrow, and to-morrow, and to-morrow,"
214    $ trans :zh 'To-morrow, and to-morrow, and to-morrow,'
215
216It is also possible to translate multi-line sentences:
217
218    $ trans :zh "Creeps in this petty pace from day to day,
219    > To the last syllable of recorded time;
220    > And all our yesterdays have lighted fools
221    > The way to dusty death."
222
223To avoid punctuation marks (e.g. "`!`") or other special characters being interpreted by the shell, use *single quotes*:
224
225    $ trans :zh 'Out, out, brief candle!'
226
227There are some cases though, you may still want to use *double quotes*: (e.g. the sentence contains a single quotation mark "`'`")
228
229    $ trans :zh "Life's but a walking shadow, a poor player"
230
231Alternatively, use the `-join-sentence` (`-j`) option to treat all arguments as one sentence so that quotes can be omitted:
232
233    $ trans -j :zh Life\'s but a walking shadow, a poor player
234
235### Brief Mode
236
237By 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:
238
239    $ trans -b :fr "Saluton, Mondo"
240
241In brief mode, phonetic notation (if any) is not shown by default. To enable this, put an at sign "`@`" in front of the language code:
242
243    $ trans -b :@ja "Saluton, Mondo"
244
245### Dictionary Mode
246
247Google 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:
248
249    $ trans :en word
250
251To enable dictionary mode no matter whether the source language and the target language are identical, use the `-dictionary` (`-d`) option.
252
253    $ trans -d fr: mot
254
255**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.
256
257### Language Identification
258
259Use the `-identify` (`-id`) option to identify the language of the text:
260
261    $ trans -id 言葉
262
263### Text-to-Speech
264
265Use the `-play` (`-p`) option to listen to the translation:
266
267    $ trans -b -p :ja "Saluton, Mondo"
268
269Use the `-speak` (`-sp`) option to listen to the original text:
270
271    $ trans -sp "你好,世界"
272
273### Terminal Paging
274
275Sometimes 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`:
276
277    $ trans -d -v word
278
279### Right-to-Left (RTL) Languages
280
281[Right-to-Left (RTL) languages](http://en.wikipedia.org/wiki/Right-to-left) are well supported via [GNU FriBidi](http://fribidi.org/).
282
283The 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:
284
285    $ trans -b -w 40 :he "Saluton, Mondo"
286
287See **[wiki: Languages](https://github.com/soimort/translate-shell/wiki/Languages)** to find out which language(s) uses a Right-to-Left writing system.
288
289### Pipeline, Input and Output
290
291If 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:
292
293    $ echo "Saluton, Mondo" | trans -b :fr
294    $ trans -b -i input.txt :fr
295
296Translations are written to standard output, or to the file specified by the `-output` (`-o`) option:
297
298    $ echo "Saluton, Mondo" | trans -b -o output.txt :fr
299
300### Translate a File
301
302Instead 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:
303
304    $ trans :fr file://input.txt
305
306**Note**: Brief mode is used when translating from file URI schemes.
307
308### Translate a Web Page
309
310To translate a web page, an http(s) URI scheme can be used as an argument:
311
312    $ trans :fr http://www.w3.org/
313
314A 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:
315
316    $ trans -browser firefox :fr http://www.w3.org/
317
318### Language Details
319
320Use the `-list` (`-L`) option to view details of one or more languages:
321
322    $ trans -L fr
323    $ trans -L de+en
324
325Some 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.
326
327### Interactive Translate Shell (REPL)
328
329Start an interactive shell using the `-shell` (or `-interactive`, `-I`) option:
330
331    $ trans -shell
332
333You may specify the source language and the target language(s) before starting an interactive shell:
334
335    $ trans -shell en:fr
336
337You 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.
338
339## Usage
340
341For 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.
342
343```
344$usage$
345```
346
347## Code List
348
349Use `trans -R` or `trans -T` to view the reference table in a terminal.
350
351For more details on languages and corresponding codes, see **[wiki: Languages](https://github.com/soimort/translate-shell/wiki/Languages)**.
352
353$code-list$
354
355## Wiki
356
357$wiki-home$
358
359## Reporting Bugs / Contributing
360
361Please review the [guidelines for contributing](https://github.com/soimort/translate-shell/blob/stable/CONTRIBUTING.md) before reporting an issue or sending a pull request.
362
363## Licensing
364
365This 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.
366