Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We can already. Almost. The translator works perfectly* as just a web page[1]. It is only a matter of combining that bit with the full-page translation code[2] and some UI to toggle it.

It is a bit of a question whether this is the way to go. You're downloading about 20mb to get all the plumbing + translation models necessary to translate a page. It would be okay if it were widespread enough that we can assume everyone already has these in their browser cache, but the trend is moving away from that model of caching[3].

* given your browser support wasm SIMD. So an x86 processor with SSE4.1, although M1 also seems to work. And no Safari, because they haven't implemented wasm SIMD[4].

[1] https://translatelocally.com/web/

[2] https://github.com/jelmervdl/translatelocally-web-ext/blob/m...

[3] https://developer.chrome.com/en/blog/http-cache-partitioning...

[4] https://webassembly.org/roadmap/



This is really encouraging to know. I was thinking more along the line of electron apps and other local-first pwas rather than normal webpages where an 20MB increase is relatively insignificant compared to the benefits it provides (privacy, robustness, no third party apis, etc).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: