AnkiWeb
- Votes
- 0 (👍 0 · 👎 0)
- Updated
- 2026-10-15
- Anki versions
- 26.08~
- Languages
- Python, JSON
- Description language
- en
AnkiWeb addon 898144224
Automatically fills a target field with translations from DeepL, Google, LibreTranslate or custom APIs when adding notes to configured decks, and can translate selected notes in the Browser.
Open on AnkiWeb Ask about alternatives
active
No GitHub repository linked.
| Min Anki | Max Anki | Updated |
|---|---|---|
| 2.1.50 | 26.08+ | 2026-10-15 |
Loading…
Translates card fields using DeepL or Google Cloud APIs, with API keys, per-deck settings, batch multi-language translation, usage tracking, and a safe mode.
Automatically translates example sentences and target words on newly created Yomitan cards into a chosen language via Google Gemini, filling the SentenceTranslation field in the background without blocking card creation.
Translates selected Anki note fields into a chosen target field using the DeepL API, with deck, field, and source/target language selection.
Selecting text during card review shows a popup with translation, example sentences, and speech, using cached results and configurable providers including private local ones.
Two-way Google Sheets sync for vocabulary decks, writing review stats back to the sheet and gating reverse cards until forward cards mature.
Translates text and notes using the DeepL API from the editor or browser, requiring a free API key.
An Anki add-on that fills a field with an AI translation from the API of your choice:
Built-in providers: DeepL, Google Cloud Translation and LibreTranslate (public or self-hosted). Others can be added as custom provider.
It should work with Anki 2.1.50 and later.
[sound:...] tags and furigana (漢字[かんじ]) before translating.{{c1::...}}, including hints) working in the translation, with any provider that keeps tags intact.Depending on the provider you want:
:fx use DeepL's free endpoint automatically, all others the paid one. If DeepL tells you to use a different endpoint, set api_url.From a release file: double-click translate_gate.ankiaddon, or in Anki go to Tools > Add-ons > Install from file….
From source:
./build.sh # runs the tests and creates dist/translate_gate.ankiaddon
Or copy the translate_gate/ folder into your Anki add-ons folder (Tools > Add-ons > View Files) and restart Anki.
Open Tools > Add-ons, select Translate Gate, and click Config:
{
"provider": "deepl",
"api_key": "your-key-here:fx",
"mappings": [
{
"deck": "Japanese",
"source_field": "Sentence",
"target_field": "Translation",
"source_lang": "JA",
"target_lang": "EN-US"
}
]
}
provider is one of deepl, google, libretranslate or custom. Each mapping has its own source_lang and target_lang; use the codes your provider expects (EN-US for DeepL, en for Google and LibreTranslate).
To use any other API, set provider to custom and describe the request in custom_api. For example, MyMemory, with "source_lang": "ja" and "target_lang": "en" in the mapping:
"provider": "custom",
"custom_api": {
"url": "https://api.mymemory.translated.net/get",
"method": "GET",
"body": {"q": "{text}", "langpair": "{source_lang}|{target_lang}"},
"response_path": "responseData.translatedText"
}
The config dialog lists every option next to the editor and more examples. The same text is in translate_gate/config.md.
The text of the configured source field is sent to the API you configure to be translated. Nothing else from your collection is sent. How that text is handled depends on the provider and your plan, so read its privacy policy before translating anything sensitive. Your API key is stored in your Anki profile's add-on config, never in the add-on code, and is only sent to the configured API.
The logic that does not need Anki lives in the translate_gate/core/ package:
config.py: config dataclasses and parsing with defaultstext.py: field HTML to plain text (tags, furigana) and backcloze.py: keeping clozes intact through translationplanning.py: deck mappings and deciding which notes to translateproviders.py: DeepL, Google, LibreTranslate and custom APIstranslate.py: sending requests with retries and batchingIt is tested with pytest:
python3 -m pytest tests
With Nix and direnv, direnv allow provides Python, pytest and ruff (see flake.nix).
translate_gate/__init__.py only contains the Anki hooks, the Browser menu entry and the threading.
CI (.forgejo/workflows/build.yml) runs the tests and builds the add-on on every push. To release, push a version tag:
git tag v1.1.0 && git push origin v1.1.0
CI then creates a Codeberg release with translate_gate-v1.1.0.ankiaddon attached, with 1.1.0 as the version shown in Anki's add-on manager. The version is not stored anywhere in the repo. Upload that file on the add-on's AnkiWeb page; AnkiWeb has no public upload API, so this step is manual.
Parts of this add-on were written with the help of an AI coding assistant.
MIT, see LICENSE.