Provide translation context via API?

51 views
Skip to first unread message

Andrew Pellerano

unread,
Sep 22, 2025, 10:33:21 AM (7 days ago) Sep 22
to Chrome Built-in AI Early Preview Program Discussions
Could we get a way to provide additional context to the translation API so it can disambiguate better?

e.g. translator.translate('Lead') it's unclear if you mean 'Lead' in the business contact sense or as a type of metal.

Developers could provide context over the existing options hash:

translator.translate('Lead', { context: 'business contact' });
translator.translate('Lead', { context: 'metal' });

My use case is I'm interested in translating a bunch of small strings throughout a web page, but the strings may be headings, list items, etc where there isn't enough context clues to infer meaning.

I think the AI translator could be superior to the browser's existing "Translate Page" in situations where the web developer knows which strings should and shouldn't be translated. As well as in frontend frameworks where the existing page-wide tool often breaks reactivity.

Thomas Steiner

unread,
Sep 22, 2025, 10:44:45 AM (7 days ago) Sep 22
to Andrew Pellerano, Chrome Built-in AI Early Preview Program Discussions
Hi Andrew,

Please follow this spec issue for this very reasonable feature request. As you can see from there, there also was a recent Chrome bug filed for this feature request. 

Cheers,
Tom

--
You received this message because you are subscribed to the Google Groups "Chrome Built-in AI Early Preview Program Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chrome-ai-dev-previe...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chrome-ai-dev-preview-discuss/55ce771f-f2a3-498c-aa75-ccbfa9d4e07fn%40chromium.org.


--
Thomas Steiner, PhD—Developer Relations Engineer (blog.tomayac.comtoot.cafe/@tomayac)

Google Spain, S.L.U.
Torre Picasso, Pl. Pablo Ruiz Picasso, 1, Tetuán, 28020 Madrid, Spain

CIF: B63272603
Inscrita en el Registro Mercantil de Madrid, sección 8, Hoja M­-435397 Tomo 24227 Folio 25

----- BEGIN PGP SIGNATURE -----
Version: GnuPG v2.4.8 (GNU/Linux)

iFy0uwAntT0bE3xtRa5AfeCheCkthAtTh3reSabiGbl0ck
0fjumBl3DCharaCTersAttH3b0ttom.xKcd.cOm/1181.
----- END PGP SIGNATURE -----
Reply all
Reply to author
Forward
0 new messages