frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Web Translator API

https://developer.mozilla.org/en-US/docs/Web/API/Translator
51•kozika•6h ago

Comments

rhabarba•4h ago
You had me at "Browser compatibility".
Raed667•4h ago
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.

rhabarba•4h ago
While I appreciate the on-device approach for a couple of reasons, it is rather ironic that Mozilla needs to document that for them.
its-summertime•4h ago
Firefox also has on-device translations for what its worth.
Asraelite•3h ago
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.

ukuina•2h ago
ollama run gemma3:1b

https://ollama.com/library/gemma3

> support for over 140 languages

diggan•1h ago
Try to translate a paragraph with 1b gemma and compare it to DeepL :) Still amazing it can understand anything at all at that scale, but can't really rely on it for much tbh
_1•2h ago
If you need to support several languages, you're going to have to have a zoo of models. Small ones just can't handle that many; and they especially aren't good enough for distribution, we only use them for understanding.
JimDabell•2h ago
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 "你好"
    cat some_file.txt | english
https://llm.datasette.io
usagisushi•1h ago
Tip: You might want to use `uv tool install llm --with llm-ollama`.

ref: https://github.com/simonw/llm/issues/575

JimDabell•1h ago
Thanks!
wittjeff•2h ago
https://ai.meta.com/blog/nllb-200-high-quality-machine-trans... https://www.youtube.com/watch?v=AGgzRE3TlvU
tempodox•6m ago
What compatibility? It's Chrome-only.
troupo•4h ago
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.

jazzypants•2h ago
I've been pleasantly surprised by the last few conversations about this type of thing that I've seen. It seems like people are pretty sick of Chrome's IE proclivities.
moron4hire•1h ago
This is the W3C standardization process.

The W3C is not a prescriptive standardization body. It doesn't have any regulatory power giving it any teeth to go after vendors acting in bad faith. So the W3C process is descriptive and encourages a period of competitive divergence in implementations. It is only after the early adopters have hammered on the features and figured out which parts they like best that a Web API can then start to get standardized.

nachomg•4h ago
This gives strong IE vibes.
lynx97•3h ago
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.
diggan•1h ago
The good news is that if the browsers offered this natively, websites wouldn't need their own implementation of this. And if it's in the client (the browser), you're most likely gonna be able to turn it off globally, just like how you like it.

Worst case scenario a user-script/extension could monkey patch it out, but probably clients will let you disable it.

sandstrom•1h ago
This is not auto-translation.

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.

lofaszvanitt•1h ago
But Reddit already does it! It's a new form of cultural colonisation by a headless society.
RockRobotRock•3h ago
https://github.com/mozilla/standards-positions/issues/1015
sandstrom•1h ago
I honestly don't understand the arguments Mozilla have against it.

Safari/webkit is positive (though no official stance yet):

https://github.com/WebKit/standards-positions/issues/339#iss...

yjftsjthsd-h•1h ago
I don't know enough to understand the DOM argument, but

> The spec assumes a certain form of translation backend, exposing information about model availability, download progress, quotas, and usage prediction. We'd like to minimize the information exposure so that the implementation can be more flexible.

reads to me as Chrome once again trying to export itself verbatim as a "standard" and Mozilla pointing out that that's not really applicable to others.

Also the WebKit post seems to raise somewhat similar arguments but on the basis of fingerprinting/privacy problems.

sfmz•2h ago
https://developer.chrome.com/docs/ai/translator-api

const translator = await Translator.create({ sourceLanguage: 'en', targetLanguage: 'fr', });

await translator.translate('Where is the next bus stop, please?');

sandstrom•1h ago
This would be very useful.

Basically, the 'translate this' button you see on Twitter or Instagram next to comments in foreign languages. This API would make it trivial for all developers to add that to their web apps.

lofaszvanitt•1h ago
Another useful feature that nobody could've replicated themselves.
indeyets•52m ago
So, the browsers have to provide some means for choosing the desired translation engine (add-on API maybe?) and this is a standard API which all of the providers should implement.

right?

pwdisswordfishz•14m ago
Why does it need to be a JavaScript API?

Why not just use the lang= attribute as it was intended, then let the user select text to translate as they wish?

tempodox•8m ago
It's only implemented in Google Chrome, so go figure.
diggan•6m ago
If it's a HTML attribute, then you can only use it with DOM elements, with no control about when it runs.

Instead, a JS API gives more flexibility and control.

Besides, I think the "lang" attribute is supposed to signal what the language of the text inside that element is, not what it could/should be. So even if going with attributes would be the way forward, a new one would need to be created.

A new PNG spec

https://www.programmax.net/articles/png-is-back/
125•bluedel•1d ago•277 comments

Gemini CLI

https://github.com/google-gemini/gemini-cli
202•sync•1h ago•106 comments

Third places and neighborhood entrepreneurship (2024)

https://www.nber.org/papers/w32604
44•WasimBhai•2h ago•52 comments

Gemini CLI: your open-source AI agent

https://blog.google/technology/developers/introducing-gemini-cli-open-source-ai-agent/
23•sunaookami•1h ago•1 comments

Is Lovable getting monetization wrong?

https://getlago.substack.com/p/lovable-makes-60m-in-6-monthsbut
14•FinnLobsien•27m ago•3 comments

Reading NFC Passport Chips in Linux

https://shkspr.mobi/blog/2025/06/reading-nfc-passport-chips-in-linux/
176•robin_reala•6h ago•49 comments

Introducing Qodo Gen CLI: Build and Run Coding Agents Anywhere in the SDLC

https://www.qodo.ai/blog/introducing-qodo-gen-cli-build-run-and-automate-agents-anywhere-in-your-sdlc/
21•benocodes•2h ago•2 comments

Second study finds Uber used opaque algorithm to dramatically boost profits

https://www.theguardian.com/technology/2025/jun/25/second-study-finds-uber-used-opaque-algorithm-to-dramatically-boost-profits
49•c420•1h ago•15 comments

Microsoft Edit

https://github.com/microsoft/edit
354•ethanpil•14h ago•188 comments

Thnickels

https://thick-coins.net/?_bhlid=8a5736885893b7837e681aa73f890b9805a4673e
321•jxmorris12•14h ago•73 comments

Yarn (YC W24) is hiring engineers in NYC

https://www.ycombinator.com/companies/yarn-2/jobs/dAUuy2r-founding-engineer
1•jasperstory•2h ago

NSF getting kicked out of headquarters by HUD

https://www.bloomberg.com/news/articles/2025-06-25/hud-plans-to-move-operations-from-washington-to-virginia
15•trauco•28m ago•1 comments

Show HN: Scream to Unlock – Blocks social media until you scream “I'm a loser”

86•madinmo•3h ago•38 comments

Fun with uv and PEP 723

https://www.cottongeeks.com/articles/2025-06-24-fun-with-uv-and-pep-723
540•deepakjois•19h ago•179 comments

Foreign Scammers Use U.S. Banks to Fleece Americans

https://www.propublica.org/article/pig-butchering-scam-cybercrime-us-banks-money-laundering
17•wstrange•1h ago•1 comments

Web Translator API

https://developer.mozilla.org/en-US/docs/Web/API/Translator
51•kozika•6h ago•31 comments

A Dictionary of the Language of Myst's D'ni

http://www.eldalamberon.com/dni_dict.htm
26•lelandfe•2d ago•2 comments

Bill Atkinson: Polaroids Showing the Evolution of the Lisa GUI [video]

https://www.youtube.com/watch?v=Qg0mHFcB510
54•zdw•3d ago•16 comments

How to Think about Parallel Programming: Not! [video] (2021)

https://www.infoq.com/presentations/Thinking-Parallel-Programming/
6•caned•2d ago•3 comments

The probability of a hash collision (2022)

https://kevingal.com/blog/collisions.html
93•subset•3d ago•17 comments

Disposable E-Cigarettes More Toxic Than Traditional Cigarettes

https://www.ucdavis.edu/news/disposable-e-cigarettes-more-toxic-traditional-cigarettes
26•geox•2h ago•3 comments

Thoughts on Asunción, Paraguay

https://cpsi.media/p/thoughts-on-asuncion-paraguay
54•Michelangelo11•2d ago•20 comments

ChatGPT's enterprise success against Copilot fuels OpenAI/Microsoft rivalry

https://www.bloomberg.com/news/articles/2025-06-24/chatgpt-vs-copilot-inside-the-openai-and-microsoft-rivalry
264•mastermaq•22h ago•276 comments

Brit politicians question Fujitsu's continued role in public sector contracts

https://www.theregister.com/2025/06/25/fujitsu_public_sector_contracts/
12•rntn•1h ago•1 comments

HDMI 2.2 will support 16K video at 60Hz

https://www.theverge.com/news/692052/hdmi-2-2-specification-released-96gbps-audio-sync-16k
11•mfiguiere•53m ago•13 comments

XBOW, an autonomous penetration tester, has reached the top spot on HackerOne

https://xbow.com/blog/top-1-how-xbow-did-it/
256•summarity•22h ago•108 comments

CareerBuilder and Monster job boards, file for bankruptcy

https://www.reuters.com/legal/litigation/careerbuilder-monster-which-once-dominated-online-job-boards-file-bankruptcy-2025-06-24/
23•gscott•2h ago•25 comments

How to Think About Time in Programming

https://shanrauf.com/archive/how-to-think-about-time-in-programming
164•rmason•18h ago•58 comments

Ancient X11 scaling technology

https://flak.tedunangst.com/post/forbidden-secrets-of-ancient-X11-scaling-technology-revealed
254•todsacerdoti•19h ago•206 comments

Subsecond: A runtime hotpatching engine for Rust hot-reloading

https://docs.rs/subsecond/0.7.0-alpha.1/subsecond/index.html
186•varbhat•19h ago•29 comments