Skip to content

Languages

yaku does not maintain a hardcoded language list. It passes the target language code to the LLM backend, which handles the actual translation. This means yaku supports every language that your chosen backend model can translate.

Common language codes (BCP 47 format):

CodeLanguageCodeLanguage
enEnglishkoKorean
zh-TWTraditional ChinesethThai
zh-CNSimplified ChineseviVietnamese
jaJapanesefrFrench
deGermanesSpanish
ptPortugueseitItalian
ruRussianarArabic

Use the full BCP 47 code when a language has regional variants. For example, zh-TW (Traditional Chinese as used in Taiwan) vs zh-CN (Simplified Chinese as used in Mainland China).

yaku validates --to and --from values against the BCP 47 standard. It normalizes case automatically (zh-twzh-TW) and rejects invalid codes with a helpful suggestion:

Terminal window
yaku --to japanese "Hello"
# Error: unknown language "japanese". Did you mean "ja"?
yaku --to zh-tw "Hello"
# Works — silently normalized to zh-TW

In the LLM prompt, yaku uses the display name alongside the code (e.g., “Translate to Japanese (ja)”) for clarity.

Every translation needs a target language. Specify it with --to:

Terminal window
yaku --to en "Bonjour le monde"
yaku --to en -f README.ja.md

Set a default to skip --to on every command:

Terminal window
yaku config set default-target en

Now these are equivalent:

Terminal window
echo "Bonjour" | yaku --to en
echo "Bonjour" | yaku # uses default-target

An explicit --to always overrides the default:

Terminal window
echo "Bonjour" | yaku --to es # Spanish, not English

By default, yaku lets the LLM auto-detect the source language. This works well for most text:

Terminal window
yaku --to en "これはテストです"
# This is a test

Use --from when you need explicit control:

Terminal window
yaku --from ja --to en "これはテストです"

When to use --from:

  • The text mixes multiple languages and auto-detection picks the wrong one.
  • You need deterministic behavior in scripts or CI/CD pipelines.
  • The text is very short (a few words) and the LLM guesses the wrong language.

If --from and --to are the same language, yaku suggests using polish mode instead:

Terminal window
yaku --from en --to en "I want talk about the deploy issue"
# Hint: source and target language are both en. Consider using --mode polish for language refinement.
  • Use the hosted backend — The default backend uses refined, per-language prompts that produce higher-quality translations. See Hosted Service & Plans for details.
  • Add context — Use --context to hint the domain. This helps the LLM pick the right terminology:
    Terminal window
    yaku --to en --context "medical documentation" -f report.zh-TW.md
  • Use a glossary — For consistent terminology across a project, create a glossary file.
  • Use polish mode for editing — If you already have a draft in the target language, --mode polish improves it without re-translating:
    Terminal window
    yaku --mode polish --to en -f draft.md