Model chooser  /  Translate and localise  /  Recurring

To localise at volume, translate with Gemini 3.8 Flash.

Product strings, help articles and support replies in ten languages add up to millions of tokens a month. Gemini 3.8 Flash is in the low cost tier, ranks level with Opus 5 on LMArena, and returns JSON that keeps keys and placeholders intact.

Why Gemini 3.8 Flash

The reasons it wins for this job.

  • Google's models have the strongest recent public translation result: Gemini 2.5 Pro topped WMT 2025. No benchmark covers 3.8 Flash yet, so test your language pairs.
  • It sits in the low cost tier while ranking level with Claude Opus 5 on LMArena, which makes it affordable to translate everything, not just the top pages.
  • JSON schema output returns translations keyed exactly like your locale files, so placeholders and keys survive.
  • Its 1M-token context holds your glossary, style guide and the full source file in a single request.

How to use it

4 steps to a first result.

  1. 1Keep a glossary per languageVersion it in your repo next to the locale files.
  2. 2Translate whole files as JSONSend key-value pairs, get key-value pairs back, validate that every key and placeholder is present.
  3. 3Run a placeholder check in CIFail the build if {name} or HTML tags differ between source and translation.
  4. 4Sample for native reviewHave a native speaker review a random 5% per release, and feed fixes back into the glossary.

Gemini API, TypeScript

Start from this.

Edit the parts in capitals, then run it.

import { GoogleGenAI } from "@google/genai";
import { readFileSync } from "node:fs";

const ai = new GoogleGenAI({});
const source = readFileSync("locales/en.json", "utf8");
const glossary = readFileSync("glossary/de.md", "utf8");

const interaction = await ai.interactions.create({
  model: "gemini-3.8-flash",
  input: `Translate the values of this JSON from English to German (informal "du", for users in Germany).
Keep every key unchanged. Keep placeholders like {name} and HTML tags exactly.
Glossary:\n${glossary}\n\nJSON:\n${source}`,
  response_format: { type: "text", mime_type: "application/json" },
});

const de = JSON.parse(interaction.output_text);
// validate: same keys, same placeholders, then write locales/de.json
Nothing is sent anywhere. It copies to your clipboard.

Alternatives that also work

If Gemini 3.8 Flash is not an option.

Claude Sonnet 5Official page →

Anthropic · closed · cost: medium

Pick it when brand voice matters more than volume, such as marketing pages and emails.

Tencent Hy-MT2 30B A3BHugging Face →

Tencent · open weights · cost: free weights; you pay for the hardware · 24K HF downloads/mo

Pick it when you self-host. Dedicated to translation, Apache 2.0 per its card, with a 1.8B version small enough for devices.

Qwen3.8 27BHugging Face →

Alibaba Qwen · open weights · cost: free weights; you pay for the hardware · 7.5M HF downloads/mo

Pick it when you need strong Chinese, Japanese or Korean on your own infrastructure.

Watch out for

Doing this just once? To translate one important piece, use Claude Opus 5. For a website, a launch post or a contract summary in another language, tone matters as much as accuracy. Claude models are consistently noted for style in translation reviews, and Opus 5 follows a glossary and a voice brief at the same time.

Sources

Checked . Models change monthly; we re-check this page when they do.

Picking the model is the easy part.

Wiring it into a workflow that runs every week, with evals, fallbacks and a cost you can predict, is the work. Fifteen minutes, no deck.

Book fifteen minutes →