Wow, thanks for the about:translations
tip - I was wondering how to do that!
Besides “Translate page” there is also a “Translate selection” option in the right-click menu so you can translate part of a page.
However, unless you download languages in the “Translation” section of Firefox preferences, it doesn’t actually always work while offline:
As you pointed out, the help page explicitly says there is “no privacy risk of sending text to third parties for analysis because translation happens on your device, not externally”, but, after I translate something in a new language I haven’t before, it still doesn’t appear as downloaded (eg having a “Remove” button instead of a “Download” button) in the preferences.
The FAQ has a question Why do I need to install languages? with this answer:
Installing languages enables Firefox to perform translations locally within your browser, prioritizing your privacy and security. As you translate, Firefox downloads partial language files as you need them. To pre-install complete languages yourself, access the language settings in Firefox Settings,
General
panel, in the Language and Appearance section under Translations.
I wonder what the difference between the “partial” language files and the full download is, and if that is really not leaking any information about the text being translated. In doing a few experiments just now, I certainly can’t translate to new languages while offline, but after I’ve translated one paragraph in a language I do seem to be able to translate subsequent paragraphs while offline.
Anyway, it probably is a good idea to click “Download” on all the languages you want to be able to translate.
after I translate something in a new language I haven’t before, it still doesn’t appear as downloaded (…) I wonder what the difference between the “partial” language files and the full download is
Possibly something @gregtatum@fosstodon.org could answer, if he has time?
@Vincent @cypherpunks You need separate files for translating "to" and "from" a language, so the download ensures you have the proper model combinations. Plus if you aren't translating to/from English, you'll need an additional model to pivot through English. The download for a language therefore could be 4 models.