const translator = await Translator.create({ sourceLanguage: 'en', targetLanguage: 'fr', });
await translator.translate('Where is the next bus stop, please?');
11–20 of 71 posts
const translator = await Translator.create({ sourceLanguage: 'en', targetLanguage: 'fr', });
await translator.translate('Where is the next bus stop, please?');
Earlier quoted context omitted.
Chrome embeds a small LLM (never stops being a funny thing) in the browser allowing them to do local translations. I assume every browser will do the same as on-device models start becoming more useful.
What's the easiest way to get this functionality outside of the browser, e.g. as a CLI tool? Last time I looked I wasn't able to find any easy to run models that supported more than a handful of languages.
https://ollama.com/library/gemma3
> support for over 140 languages
Earlier quoted context omitted.
Chrome embeds a small LLM (never stops being a funny thing) in the browser allowing them to do local translations. I assume every browser will do the same as on-device models start becoming more useful.
What's the easiest way to get this functionality outside of the browser, e.g. as a CLI tool? Last time I looked I wasn't able to find any easy to run models that supported more than a handful of languages.
While this might be useful, be mindful: - it's experimental - the "specification" is nowhere near a standards track: https://webmachinelearning.github.io/translation-api/ Of course it's already shipped in Chrome, and now Chrome pretends that its own Chrome-only API is somehow standard. Expect people on HN to blame other browsers for not shipping this.
Earlier quoted context omitted.
Chrome embeds a small LLM (never stops being a funny thing) in the browser allowing them to do local translations. I assume every browser will do the same as on-device models start becoming more useful.
What's the easiest way to get this functionality outside of the browser, e.g. as a CLI tool? Last time I looked I wasn't able to find any easy to run models that supported more than a handful of languages.
You can use llm for this fairly easily:
uv tool install llm
# Set up your model however you like. For instance:
llm install llm-ollama
ollama pull mistral-small3.2
llm --model mistral-small3.2 --system "Translate to English, no other output" --save english
alias english="llm --template english"
english "Bonjour"
english "Hola"
english "Γειά σου"
english "你好"
cat some_file.txt | english
https://llm.datasette.ioEarlier quoted context omitted.
Chrome embeds a small LLM (never stops being a funny thing) in the browser allowing them to do local translations. I assume every browser will do the same as on-device models start becoming more useful.
What's the easiest way to get this functionality outside of the browser, e.g. as a CLI tool? Last time I looked I wasn't able to find any easy to run models that supported more than a handful of languages.
Earlier quoted context omitted.
What's the easiest way to get this functionality outside of the browser, e.g. as a CLI tool? Last time I looked I wasn't able to find any easy to run models that supported more than a handful of languages.
ollama run gemma3:1b https://ollama.com/library/gemma3 > support for over 140 languages
Can we please NOT autotranslate the web? I have yet to find a site where the quality of autotranslate does not make me stop using that site. I was already irritated when google started to show me de.wikipedia.org articles adespite me explicitly searching for the english article name. Then came Etsy, where the autotranslate quality was so bad I stopped using the site altogether.
Worst case scenario a user-script/extension could monkey patch it out, but probably clients will let you disable it.
Earlier quoted context omitted.
What's the easiest way to get this functionality outside of the browser, e.g. as a CLI tool? Last time I looked I wasn't able to find any easy to run models that supported more than a handful of languages.
That depends on what counts as “a handful of languages” for you. You can use llm for this fairly easily: uv tool install llm # Set up your model however you like. For instance: llm install llm-ollama ollama pull mistral-small3.2 llm --model mistral-small3.2 --system "Translate to English, no other output" --save english alias english="llm --template english" english "Bonjour" english "Hola" english "Γειά σου" english…
Can we please NOT autotranslate the web? I have yet to find a site where the quality of autotranslate does not make me stop using that site. I was already irritated when google started to show me de.wikipedia.org articles adespite me explicitly searching for the english article name. Then came Etsy, where the autotranslate quality was so bad I stopped using the site altogether.
Rather, it's an API developers can use to add inline translation to web apps.
For example, under a comment in your app, you can (a) detect the language, and (b) if it's different from the current users/browsers language, offer to translate it with a small link (c) if the user clicks the link, the content is translated to their language.