← Back to release summary

Language Detector API

Category
Miscellaneous
Type
New or changed feature
Status
In developer trial (Behind a flag) (Chrome 138)
Intent stage
None

Summary

A JavaScript API for detecting the language of text, with confidence levels. An important supplement to translation is language detection. This can be combined with translation, e.g. taking user input in an unknown language and translating it to a specific target language. Browsers today often already have langauge detection capabilities, and we want to offer them to web developers through a JavaScript API, supplementing the translation API. An enterprise policy (GenAILocalFoundationalModelSettings) is available to disable the underlying model downloading which would render this API unavailable.

Motivation

An important supplement to translation is language detection. This can be combined with translation, e.g. taking user input in an unknown language and translating it to a specific target language. Browsers today often already have langauge detection capabilities, and we want to offer them to web developers through a JavaScript API, supplementing the translation API.

Standards & signals

Explainers: https://github.com/WICG/translation-api/blob/main/README.md

View on chromestatus.com