◉GEMINI LABJP
●TTS — Gemini 3.8 Flash TTS and Flash-Lite TTS are GA as of September 22. Voice replication works on Flash only; Flash-Lite returns a 400●2.5 — Access to the 2.5 models is now limited to accounts with prior active usage (September 18). Not a deprecation: new projects should start on 3.5 Flash-Lite or 3.8 Flash●9/30 — Two days until gemini-omni-flash-preview shuts down, and gemini-2.5-flash-image follows on October 2. In practice the replacement for the latter is gemini-3.1-flash-image●AUTH — Reports continue of Gemini CLI sign-in failing only for Workspace Enterprise accounts while personal accounts work. Isolating the two is the current focus●NEW — Moving to 3.8 Flash-Lite TTS meant re-picking the voice for our guidance audio●429 — A brand-new project shows Free tier yet returns 429 with limit: 0. Here is what to check in the first hour●TTS — Gemini 3.8 Flash TTS and Flash-Lite TTS are GA as of September 22. Voice replication works on Flash only; Flash-Lite returns a 400●2.5 — Access to the 2.5 models is now limited to accounts with prior active usage (September 18). Not a deprecation: new projects should start on 3.5 Flash-Lite or 3.8 Flash●9/30 — Two days until gemini-omni-flash-preview shuts down, and gemini-2.5-flash-image follows on October 2. In practice the replacement for the latter is gemini-3.1-flash-image●AUTH — Reports continue of Gemini CLI sign-in failing only for Workspace Enterprise accounts while personal accounts work. Isolating the two is the current focus●NEW — Moving to 3.8 Flash-Lite TTS meant re-picking the voice for our guidance audio●429 — A brand-new project shows Free tier yet returns 429 with limit: 0. Here is what to check in the first hour
Articles/API / SDK
◈ API / SDK/2026-06-19Advanced

Generate Japanese and English in One Structured Call to Stop Term Drift

Generating Japanese and English versions separately makes terminology drift article by article. Pair both languages in one Gemini 3.5 Flash structured-output call, pin a glossary, and detect drift mechanically — with measured results.

Gemini API243Structured Output11Multilingual3responseSchema6Gemini 3.5 Flash3

✦ Premium Article

Back when I generated the Japanese and English versions of an article in two separate calls, the part of my day that kept getting eaten was proofreading. Running paired bilingual posts at Dolice as an indie developer, the body would be correct, yet "streaming" would come out as streaming in one version and incremental delivery in the other. To a reader these are tiny snags, but when terminology wobbles from article to article, the quiet trust a site earns gets chipped away.

Most of that drift came from one thing: I was producing Japanese and English in two independent calls. The model picks "the most natural word right here" on each call, so when the calls are split, the wording splits too. In my own workflow I switched to putting both languages into a single structured output and fixing the glossary before generation. This article is the design, and a record of what actually changed after the switch.

Where the translation drifts when you generate separately

It helps to locate the drift first. When I generated the two languages independently, three spots wobbled most:

  1. Product and feature terms (e.g. rendering "思考" as both thinking and reasoning)
  2. UI labels and button text ("保存" as Save / Store / Keep)
  3. Heading granularity (Japanese gets 8 sections, English silently compresses to 6)

The third one is the nastiest. When the meaning matches but the structure does not, switching languages makes the reader feel they cannot return to the same article. My site pairs URLs across languages, so a structural mismatch becomes a step the reader trips over.

The root cause is that the two calls do not know each other's results. So the clean fix is to put both into one output and let the model decide them together.

Decide two things before writing the schema

Before any schema, pin down two things. Skip them and drift survives even with structured output.

First, a glossary: the terms you refuse to let wobble, held as Japanese, English, and a short usage note. Second, an output contract: the fields that must match across languages (section count, number of code blocks, and so on).

Keep the glossary in an external file and load it at generation time. A minimal shape:

{
  "glossary": [
    { "ja": "思考", "en": "thinking", "note": "Gemini's thinking feature; do not split into reasoning" },
    { "ja": "構造化出力", "en": "structured output", "note": "umbrella term when using responseSchema" },
    { "ja": "用語集", "en": "glossary", "note": "the topic here; do not translate as vocabulary" }
  ],
  "contract": { "min_sections": 6, "lang_pair": ["ja", "en"] }
}

Once "what should match" is written down, the rest is just schema and verification.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦A concrete responseSchema that pairs Japanese and English so two calls collapse into one
✦Pinning a glossary in the system instruction cut translation drift by about 45% — with the verification code
✦Mechanical drift detection via term presence and length ratio, plus a partial-regeneration fallback
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $15 for lifetime access
View Membership →

Related Articles

◈ API / SDK2026-05-21
When responseSchema enum returns unexpected values — debugging Gemini API
Why Gemini API sometimes returns values outside the enum you defined in responseSchema, and the three-layer workaround I use in production for my wallpaper app classification pipeline.
◈ API / SDK2026-07-13
When an Optional Field Comes Back Three Ways: Null, Empty String, and Missing Key in Gemini Structured Output
Optional fields in Gemini structured output drift between null, empty string, and a missing key, and downstream code breaks in three different ways. Here is how I collapse all three into one shape using nullable in responseSchema and a post-output normalization gate, with numbers from a nightly batch.
◈ API / SDK2026-06-27
Your Gemini Structured Output Keys Keep Reordering — Pin Them With propertyOrdering
You constrained the shape with responseSchema, yet the JSON key order shifts between calls and your snapshot tests go red for no reason. Here is why field order is not guaranteed by default, how propertyOrdering fixes it, how Pydantic sets it for you, and how to align few-shot examples — all with working code.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links