← 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

WPT details: We hope to work on web platform tests for this feature, but how much we can guarantee as testable beyond the surface API is unclear. For example, since no specific languages are guaranteed to be supported, it's not clear we can actually test language detection. APIs to mock the results might help here.

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 language detection capabilities, and we want to offer them to web developers through a JavaScript API, supplementing the translation API.

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

Ecosystem

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

View on chromestatus.com