From 6972ad587811569d0edecdea21f7235086b19f68 Mon Sep 17 00:00:00 2001 From: uinput Date: Fri, 15 Mar 2019 15:50:29 +0100 Subject: [PATCH] Add new languages, fixes #9. --- README.md | 20 +++++++++++--------- deeplator/translator.py | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0aa9f5b..14c759c 100644 --- a/README.md +++ b/README.md @@ -22,15 +22,17 @@ See the table below for all language codes. For example, if you were to translate from English to German, the argument should be `-l EN-DE`. You can also tell DeepL to automatically detect the language of the source text by supplying `AUTO` as the source language (e.g. `-l AUTO-DE`). -|Language|Code| -|:-------|:--:| -|English |EN | -|German |DE | -|French |FR | -|Spanish |ES | -|Italian |IT | -|Dutch |NL | -|Polish |PL | +|Language |Code| +|:----------|:--:| +|German |DE | +|English |EN | +|Spanish |ES | +|French |FR | +|Italian |IT | +|Dutch |NL | +|Polish |PL | +|Portuguese |PT | +|Russian |RU | You can tell Deeplator to read input from a file using the `-f PATH` argument. When ommitted, Deeplator will read input from `stdin` instead. diff --git a/deeplator/translator.py b/deeplator/translator.py index 126e4a8..99f17ab 100644 --- a/deeplator/translator.py +++ b/deeplator/translator.py @@ -4,7 +4,7 @@ POST_URL = "https://www2.deepl.com/jsonrpc" AUTO_LANG = "AUTO" -TARGET_LANGS = ["EN", "DE", "FR", "ES", "IT", "NL", "PL"] +TARGET_LANGS = ["EN", "DE", "FR", "ES", "IT", "NL", "PL", "PT", "RU"] SOURCE_LANGS = TARGET_LANGS + [AUTO_LANG] LENGTH_LIMIT = 5000