demo · v130

Language Detector

Type text in any language and click "detect". The on-device LanguageDetector returns a ranked list of {detectedLanguage, confidence} entries — no network round-trip, no API key.

requires the Built-in AI / Language Detection flag Enable chrome://flags/#language-detection-api (Chrome 130+) or join the Built-in AI origin trial. If the API is not available, the demo falls back to a heuristic character-set detector so the page still works.

sample snippets

results

click "detect" to run the API

the code

if ("LanguageDetector" in self) {
  const detector = await LanguageDetector.create();
  const results = await detector.detect("Bore da, Cymru");
  // [{ detectedLanguage: "cy", confidence: 0.93 }, …]
}

see also