Model chooser / Translate and localise / Recurring
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
How to use it
{name} or HTML tags differ between source and translation.Gemini API, TypeScript
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
Alternatives that also work
Pick it when brand voice matters more than volume, such as marketing pages and emails.
Pick it when you self-host. Dedicated to translation, Apache 2.0 per its card, with a 1.8B version small enough for devices.
Pick it when you need strong Chinese, Japanese or Korean on your own infrastructure.
Watch out for
Sources
Checked . Models change monthly; we re-check this page when they do.
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.