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.
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.
Explainers: https://github.com/WICG/translation-api/blob/main/README.md