AI-generated Key Takeaways
-
ML Kit's language identification API allows you to determine the language of a text string, which is particularly helpful when dealing with user-generated content that often lacks language information.
-
It supports a wide range of languages, including romanized versions of Arabic, Bulgarian, Greek, Hindi, Japanese, Russian, and Chinese text.
-
The API can provide a simple language identification or a confidence distribution across multiple languages for a given text.

With ML Kit's on-device language identification API, you can determine the language of a string of text.
Language identification can be useful when working with user-provided text, which often doesn't come with any language information.
Key capabilities
-
Broad language support.Identifies over one hundred different languages. See the complete list .
-
Romanized text support.Identifies Arabic, Bulgarian, Greek, Hindi, Japanese, Russian, and Chinese text in both native and romanized script.
Example results
| Simple language identification | |
|---|---|
| "My hovercraft is full of eels." | en
(English) |
| "Dao shan xue hai" | zh-Latn
(Latinized Chinese) |
| "ph'nglui mglw'nafh wgah'nagl fhtagn" | und
(undetermined) |
| Confidence distribution | |
|---|---|
| "an amicable coup d'etat" | en
(0.52)fr
(0.44)ca
(0.03) |


