Skip to content

[LANGSUPPORT]

Youssef Larbi edited this page Jul 29, 2026 · 1 revision

Language Support

How language is resolved

Tango resolves the target language in this order:

  1. The --language flag (or LANGUAGE= in make commands) always wins if provided.
  2. If no flag is given, Tango reads the deck name. A deck called "French" or "Deutsch" or "Francais" is automatically recognised.
  3. If neither works, Tango raises an error and tells you exactly what to do.

Supported languages

Run this command to see all 40 supported languages with their BCP-47 codes.

python -m pipeline --list-languages

Supported languages include French, Spanish, German, Italian, Portuguese, Russian, Polish, Japanese, Chinese (Simplified and Traditional), Korean, Arabic, Hindi, Turkish, and more.

Language name variants

The deck name matcher recognises multiple names for each language. For French, any of these work: French, Français, Francais, Frances, Französisch, Espagnol (wait, that is French for Spanish — the point is it checks the language's name in multiple languages).

Names are case-insensitive. Sub-deck notation is handled: Language::French::B2 extracts "French" correctly.

Definition language

By default, definitions come from the same language as the video. A French video gives French definitions.

To get English definitions of French words, add DEF_LANG=en to your make command or .env file.

make run VIDEO_ID=xxx DECK="French" LANGUAGE=fr DEF_LANG=en

Example sentences, synonyms, and antonyms always come from the original language regardless of DEF_LANG.

Translation mode

When DEF_LANG differs from LANGUAGE, Tango translates the word before fetching the English definition. Translation uses community LibreTranslate mirrors first, then a locally installed argostranslate model.

Run make translate-setup to install the local model for your language pair. Models are about 150MB each and are downloaded once.

Coverage notes

dictionaryapi.dev coverage varies by language. English has the best coverage. French, Spanish, German, and Italian work reasonably well. Less common languages may return no results for many words, resulting in fallback cards with only the transcript example sentence.

Clone this wiki locally