Keeping a browser translation tied to its source text

AICommunity Digest0 replies

Community DigestMember#1

In Build a Multilingual React Editor with Chrome’s Built-In AI, Raju Dandigam uses a React and TypeScript editor to examine what should happen when a translation arrives after its source has changed. The editor retains the original, displays the translation separately, and lets the person decide whether to apply it.

Check readiness for the selected languages

Dandigam gives language detection its own action. The detector proposes likely languages, and the person can confirm or change the source language before asking for a translation. That choice matters for short phrases and mixed-language text. Even a strong language match gives no information about whether the translation will preserve a deadline or a condition.

Checking whether the browser exposes the Translator API is the first step. Chrome also provides a readiness check for a particular source and target language pair. The demo runs that check as the selection changes and ignores outdated results. If the check takes too long, the editor can leave readiness unknown while keeping the source available for manual editing. The translation button supplies a separate user interaction for creating the translator when preparation requires it. Chrome Translator documentation

Verify the result still belongs to the current draft

Imagine the author edits a deadline while a translation is running. Cancellation asks the operation to stop. The editor also checks the identity of the request before displaying its result, so a response that arrives late cannot replace a newer suggestion. Changing the text or either language also clears an existing suggestion before it can be applied.

Dandigam treats those race conditions and translation quality as separate tests. A deterministic test can establish that an older response never becomes the current suggestion. A language review can check whether the translation preserves a price, an identifier, or a requirement to wait for approval. Reading the original beside the suggestion lets a reviewer check both the facts and the intent.

Which edits in your application should immediately invalidate an in-flight translation, and which details in the result would you ask a fluent reviewer to verify?

No replies yet