dom...@chromium.org, fer...@chromium.org, kenji...@chromium.org, ay...@chromium.org, mem...@chromium.org, chris...@chromium.org, dbo...@chromium.org
https://github.com/WICG/translation-api/blob/main/README.md
https://webmachinelearning.github.io/translation-api/#language-detector-api
Note that although the translator API and language detector APIs both live in a single specification, they can be implemented independently, and this Intent is only for the language detector API.
A JavaScript API for detecting the language of text, with confidence levels.
https://github.com/w3ctag/design-reviews/issues/948
Issues addressed
The TAG had a number of questions and suggestions, particularly around API shape, all of which were addressed and incorporated into the design.
Language Detector API
LanguageDetectionAPI
https://github.com/WICG/translation-api/blob/main/README.md
kV8LanguageDetector_Detect_Method
This feature, like all built-in AI features, has inherent interoperability risks due to the use of AI models whose behavior is not fully specified. See some general discussion in https://www.w3.org/reports/ai-web-impact/#interop.
By providing a high-level API with clear output formats, as well as a capabilities API for detecting what a given browser supports, we believe we can guide web developers toward using the API in an interoperable way that does not depend on the specific models that a given browser or browser version uses.
Gecko: No signal (https://github.com/mozilla/standards-positions/issues/1015)
WebKit: No signal (https://github.com/WebKit/standards-positions/issues/339)
Web developers: Positive (https://github.com/WICG/proposals/issues/147)
Other signals:
This API will likely frequently be used in concert with the translator API (https://chromestatus.com/feature/5172811302961152).
The language detection is run on the main thread, the same as the browser's built-in language detection. The inference is fast enough that it is not a concern.
This feature would definitely benefit from having polyfills, backed by any of: cloud services, lazily-loaded on-device models using WebGPU, or the web developer's own server. We anticipate seeing an ecosystem of such polyfills grow as more developers experiment with this API.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
Basic tooling suffices
Yes
The WPTs test the API surface, but since no specific language is guaranteed to be supported, we cannot test the actual language detection. Some tests will need to be marked as optional as they assume certain language support. They also currently do not pass on wpt.fyi since it runs without a language detection model, so creation of LanguageDetector fails.
language-detection-api
LanguageDetectionAPI
Will ship enabled for all users
False
kV8AILanguageDetector_Detect_Method
None but the API shape is designed with extensibility in mind
https://chromestatus.com/feature/6494349985841152?gate=5122129510268928
Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/Ie46tc6_8so/m/eY1huFmOAAAJ
Intent to Experiment: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM0wra-WvH-sxxWndwAWPLF3eEYqeLhXrz-VmZKH4Wxzbpse-Q%40mail.gmail.com
Intent to Extend Experiment 1: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAO4d-SsFc3ucbmasgZmWn4PE_TOMMnWZQCzrL%3DXbbo5tDxMSOg%40mail.gmail.com--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJcT_ZgG8%2BepW52jqPEbny4cCCYbSC9q6r8sw6uKmrw_gphpwA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Hi Chris,Yes, the intent is to ship section 4 from the linked specification.Regarding Mozilla, we have no signal from them.
The discussion in the API owners meeting raised the question of whether language detection has fewer fingerprinting risks than the other APIs covered by https://webmachinelearning.github.io/writing-assistance-apis/#privacy. Could you say something about that in https://webmachinelearning.github.io/translation-api/#privacy?
You received this message because you are subscribed to the Google Groups "chrome-chia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chrome-chia...@google.com.
To view this discussion visit https://groups.google.com/a/google.com/d/msgid/chrome-chia/CANh-dXnvqTU0k7dEKRy%2BYBCvjzrDFYFPza_D7%3DVvEdCCR9W9jA%40mail.gmail.com.
On Wed, Apr 30, 2025, 3:56 PM Deepti Bogadi <dbo...@chromium.org> wrote:Hi Chris,Yes, the intent is to ship section 4 from the linked specification.Regarding Mozilla, we have no signal from them.Have you reached out to discuss? I'm concerned there might be multiple incompatible translation apis under development.
You received this message because you are subscribed to the Google Groups "chrome-chia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chrome-chia...@google.com.
To view this discussion visit https://groups.google.com/a/google.com/d/msgid/chrome-chia/CAOMQ%2Bw9Aksov83aRn2UuTcFj_tJ%3D67JcTg28trmi_wtQeQ-S4g%40mail.gmail.com.
LGTM2
/Daniel
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/a81a7ae4-16ca-4ba7-bf43-c18d85d681d0%40gmail.com.
To view this discussion visit https://groups.google.com/a/google.com/d/msgid/chrome-chia/924f6b22-dd09-43f5-8a98-aea4bfd06376n%40chromium.org.