daisuke replied to the below article:

Browser-Native Translation and Language Detection APIs Coming Soon

洪 民憙 (Hong Minhee) @hongminhee@hackers.pub

Just reviewed the W3C draft for the Translator and Language Detector APIs. This is genuinely exciting development for web developers.

The proposal would add native browser support for:

  • Text translation between languages
  • Language detection of arbitrary text
  • Both with streaming capabilities

No more relying on third-party translation services or embedding external APIs for basic language operations. All processing happens locally in the browser.

The API design is clean and straightforward:

// Translation example
const translator = await Translator.create({
  sourceLanguage: "en",
  targetLanguage: "fr"
});

const translatedText = await translator.translate("Hello world");

// Language detection example
const detector = await LanguageDetector.create();
const results = await detector.detect("Hello world");
// Returns array of detected languages with confidence scores

This will be a game-changer for multilingual sites and applications. The browser handles downloading appropriate language models and manages usage quotas.

The spec is still in draft form but shows promising progress toward standardizing these capabilities across browsers. Looking forward to seeing this implemented.

Read more →

@hongminhee洪 民憙 (Hong Minhee)

近そうですね。 Chrome Built-in AIでのステータスもだいぶ前に「Early Preview Program (EPP)」からOrigin Trialになってました。

https://developer.chrome.com/docs/ai/built-in-apis

このEPPのTranslator, Language Detector, Sammarizerの各APIはLocalにGemini NanoをダウンロードしてChrome Canaryで管理(chrome://on-device-translation-internals/)してテストされていました。

画像のように個別の言語辞書データをインストールしてトレーニングさせる感じ。

W3CもChromeも同じGoogle ChromeのDomenicさんが管理してるんですね。

Google Chrome Canary (On Device Translation Internals) Language Packages.
1
0

If you have a fediverse account, you can reply to this note from your own instance. Search https://hackers.pub/ap/notes/0195eacf-75a5-7425-9671-a8725342d91b on your instance and reply to it.

@daidaisuke Domenicさんは東京在住w github.com/domenic