Yomitan → Anki: AI Sentence Translator
Adds automatic sentence translation to cards created through Yomitan.
When you add a word and example sentence to Anki using Yomitan, the add-on sends the sentence and target word to Google Gemini and fills the SentenceTranslation field with a natural, context-aware translation.
The card is created immediately. Translation runs in the background.
How it works
Yomitan → Anki → Gemini → SentenceTranslation
You use Yomitan as usual:
- Find a word while watching subtitles.
- Add the entry to Anki using your normal Yomitan workflow.
- Anki creates the card immediately.
- The add-on sends the sentence and target word to Gemini in the background.
- When the response is ready,
SentenceTranslation is filled automatically.
You do not need to do anything for each individual card.
Features
- Context-aware sentence translation instead of word-for-word translation
- The contextual translation of the target word is highlighted in bold
- Background translation without blocking card creation
- Uses your own Google Gemini API key
- Configurable source and target languages
- Structured Gemini output with validation before writing to Anki
- Failed Gemini requests do not prevent the card from being created
Setup
1. Install the add-on
Install the add-on from AnkiWeb.
2. Open the add-on settings
In Anki, go to:
Tools → Add-ons → select "Yomitan → Anki: AI Sentence Translator" → Config
This opens the add-on settings window.
3. Get a Gemini API key
The add-on uses your own Google Gemini API key.
Open Google AI Studio:
https://aistudio.google.com/apikey
- Sign in with your Google account.
- Create or select a project if Google asks you to.
- Create an API key.
- Copy the API key.
You do not need Python, a terminal, Windows environment variables, or manual file editing.
4. Enter the API key
Paste the key into the Gemini API key field in the add-on settings.
Click Test connection.
If the key is valid and Gemini is available, the add-on will confirm the connection.
5. Choose the languages
Source language:
Leave this as Auto-detect unless you want to specify it manually.
Target language:
Choose the language you want the sentence translated into.
Examples:
Source: Auto-detect
Target: Russian
or
Source: Auto-detect
Target: English
6. Save
Save the settings.
That's it.
From this point on, use Yomitan normally. New cards added through the Yomitan → Anki workflow will be translated automatically in the background.
Example
English
Many employers are adopting a full 5 day office week or a hybrid schedule, so the competition for fully remote positions has increased.
Russian
Многие работодатели возвращаются к полной пятидневке в офисе или вводят гибридный график, поэтому конкуренция за полностью удаленные позиции возросла.
The target word is translated according to the context of the sentence rather than simply using a dictionary definition.
Important
- You need your own Google Gemini API key.
- Gemini API usage is subject to Google's current API limits and pricing.
- The sentence and target word are sent to Google Gemini when a translation is requested.
- The add-on does not intentionally send unrelated Anki cards or collection data for translation.
- If Gemini is unavailable or returns an error, the card remains in Anki normally; only the automatic translation is missing.
Known limitations
- Automatic translation currently applies to new cards added through the supported Yomitan → Anki workflow.
- Existing notes are not automatically backfilled in this version.
- Translation quality depends on the AI model and the context available in the source sentence.
- An internet connection is required when the translation request is made.
Roadmap
- Retry handling for failed translation requests
- Translation of older notes with missing translations
- Additional AI providers
- Improved multilingual options