-
Notifications
You must be signed in to change notification settings - Fork 0
[LANGSUPPORT]
Tango resolves the target language in this order:
- The
--languageflag (orLANGUAGE=in make commands) always wins if provided. - If no flag is given, Tango reads the deck name. A deck called "French" or "Deutsch" or "Francais" is automatically recognised.
- If neither works, Tango raises an error and tells you exactly what to do.
Run this command to see all 40 supported languages with their BCP-47 codes.
python -m pipeline --list-languagesSupported languages include French, Spanish, German, Italian, Portuguese, Russian, Polish, Japanese, Chinese (Simplified and Traditional), Korean, Arabic, Hindi, Turkish, and more.
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.
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=enExample sentences, synonyms, and antonyms always come from the original language regardless of DEF_LANG.
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.
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.