←back to thread

Web Translator API

(developer.mozilla.org)
97 points kozika | 1 comments | | HN request time: 0s | source
Show context
pwdisswordfishz ◴[] No.44377637[source]
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?

replies(2): >>44377694 #>>44377719 #
tempodox ◴[] No.44377694[source]
It's only implemented in Google Chrome, so go figure.
replies(1): >>44378307 #
1. Uehreka ◴[] No.44378307[source]
If Chrome tried to pull this in like 2016, when Google Translate was the only-ish game in town, I’d call them out for it. But we now have multiple competing open weights translation models that are really good, making this kind of service essentially a commodity. One vendor might give users free access to their services to entice them to use their browser, another might differentiate themself by running the model locally and giving the user better privacy guarantees in exchange for performance.

I get that this is one more brick in the wall that teams like LadyBird will have to maintain, but as a web developer I do think more Web API features is generally a good thing, as it makes it easier for smaller shops to implement richer functionality.