Live data from Hacker News

Web Translator API

developer.mozilla.org

21–30 of 71 posts

Re: Web Translator API

#22
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.

Re: Web Translator API

#23

Earlier quoted context omitted.

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…

Tip: You might want to use `uv tool install llm --with llm-ollama`. ref: https://github.com/simonw/llm/issues/575

Thanks!

Re: Web Translator API

#24
post #3

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.

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.

Re: Web Translator API

#26
post #8

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.

But Reddit already does it! It's a new form of cultural colonisation by a headless society.

Re: Web Translator API

#27

https://github.com/mozilla/standards-positions/issues/1015

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...

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.

Re: Web Translator API

#28
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?

Post reply on HN