Contact emails
rei...@chromium.org
Specification
https://webmachinelearning.github.io/translation-api/#language-detector-api
Summary
Two new detectable language codes, "zh-Hant" and "zh-Hans" will be added. Detection results that previously returned "zh" will now return one of these new values.
While this is a developer-visible change it fits within the framework already present in the API for returning more specific language codes. For example ja vs. ja-Latn. This notice is being sent as a PSA for developers who have requested these more specific detection results.
Blink component
Blink>AI>Translator & Language Detector
Web Feature ID
languagedetector
Risks
Interoperability and Compatibility
No interoperability risk as this is an incremental change to a shipping single-engine feature. The main compatibility risk is sites expecting the original "zh" output not handling the more specific "zh-Hant" or "zh-Hans" values. This is not an incompatible change because script variants are allowed by the specification and already returned in other cases.
Gecko: Negative (
https://github.com/mozilla/standards-positions/issues/1015) Note, this position mainly refers to the Translator API rather than the Language Detector API since they were shipped as a pair. No position has been requested for this specific change.
WebKit: No signal (
https://github.com/WebKit/standards-positions/issues/339)
Web developers: Strongly positive Private feedback from developers that the ability to differentiate here extremely important.
Other signals:
WebView application risks
Does this intent deprecate or change behavior of existing APIs,
such that it has potentially high risk for Android WebView-based
applications?
No information provided
Debuggability
No information provided
Will this feature be supported on all six Blink platforms
(Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Yes
Yes
New tests have been added to exercise this case.
Tracking bug
https://crbug.com/519251262
Estimated milestones
| Shipping on desktop | 151 |
| Shipping on Android | 151 |
| Shipping on WebView | 151 |
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5138651886518272