RE: https://mastodon.social/@pixelfed/117234465193694527
I found a clever and efficient way to handle translations offline, with 59 supported languages and built in language detection.
We also cache translated text using Tanstack Query, and use your device language to check only visible captions to see if we show the translation button.
The first time you press the button, we download a small translation model (30MB) and perform the translation, caching the model for future use.
Short text, mentions and links are ignored.
On-device translations with 59 supported languages, are coming to the new Pixelfed app for both Android and iOS!
No data leaves your device, language recognition and translation happens on your device.
@dansup@mastodon.social
Hello Daniel!
out of curiosity, since the "original" message is already coming from the server, what is the point of having the translation happening on the device? Couldn't it happen in the server directly then?