I just recommended someone to use Firefox for its excellent translation capability. And I think my reply warrants an entire post, so here is a copy of my reply. This is just a reminder that you can visit websites with other languages too. However Japanese and Korean are not supported yet, which would be helpful for me. Hopefully they add the support soon. But for German in example it works:
You could use a translation tool, for something that looks interesting to you. At least Firefox makes this easy, with its builtin translation functionality (without Google as far as I understand, and I think local/offline only, but can be wrong). Firefox is my main way to interact with Lemmy:
Directly in the addressbar for non native languages:
Or through menu:
BTW I just saw the link that describes it: https://support.mozilla.org/en-US/kb/website-translation
Note: Unlike other browsers that rely on cloud services, Firefox keeps your data safe on your device. There’s no privacy risk of sending text to third parties for analysis because translation happens on your device, not externally.
One more reason to use Firefox.
Edit: User Lazycog in the comments pointed out that you can also open a new tab for free text translations. Type about:translations
in the addressbar and you get this:
Edit: Another user Arthur Besse in the comments pointed out that you can translate current selection only too. And you need to install language packs, so those will be available offline too. Otherwise its online connected I assume.
Select text and right click, so you can translate that part only:
Go to Firefox General Settings page, scroll down to Translations section and download the packages you need. Also checkout what its own settings has to offer, for some customization:
Recently in some post someone mentioned that you can directly access the translator for free-input text by writing to the url bar:
about:translations
Oh that one is good too, thanks. Will add it to my bookmark toolbar.
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.
Ah, good idea to download for offline translation. I just checked it, it will translate into languages I do not have it installed. Probably that’s when it does online connection? So either install all or the languages you are interested in. Also about the “Translation selection” is excellent. I will add these to the post, so people don’t miss it if they don’t read comments. Good tips.
Edit: Ah maybe the partial files is meant for the online translation, so its very fast, but incomplete maybe? Meaning the translation itself is done offline, even if you don’t have the full language pack installed. So it downloads a partial file that is enough to translate this part. Maybe the partial means only one way, like English to Bulgarian, but not other way. It’s a bit speculation on my part.
Probably that’s when it does online connection?
since the help says it is downloading “partial language files” automatically, and the button never changes from “Download” to “Remove” if you don’t click Download, logically it must sometimes need to download more of a language which you have previous downloaded a “partial language file” of.
i am curious if the choice of which parts of the “language file” (aka model) it is downloading really does not reveal anything about the text you’re translating; i suspect it most likely does reveal something about the input text to the server… but i’m not motivated enough to research it further at the moment.
Mhm, I cannot find details about this too. Maybe Firefox itself has a language identifier for offline check, and if it thinks its in “Bulgarian”, then it will download the partial pack. Because Firefox must have such an identifier, otherwise how would it know what language to translate into? It is even capable of knowing its “Japanese” or “Korean” language, which are not even supported.
Yeah, that would make sense - language detection is trivial and can be done with a small statistical model; nothing as complicated as a neural network is needed, i think just looking at bigram frequency is accurate enough when you have more than a few words.
If that is what is happening, and it is only leaking the language pair to the server the first time that pair is needed, that would be nice… I wish they made it clear if that is what is happening 😢
Sadly the translations are shit and even worse than the infamous Google translator. Nothing comes even close to DeepL. At least it’s local though.
For me it’s been actually pretty good. But I guess it could be language dependent
I wouldn’t say its shit, although I don’t have extensive experience. Need to test this more. At least it works and for privacy focused people its better than nothing. I don’t expect it to rival Ai supported translation that are capable of very complex and good translations like DeepL.
I have noticed that translation of closely related languages are better in Firefox. Although I also feel that is true foe almost all translators
Well, it’s the same AI supported translation running locally, so I very much expect it rivaling the online service.
in my experience DeepL has the best results for some language pairs while Google is better for others (and has a lot more languages).
But, these days I’m happy to say Firefox translate is the first thing I try and it is often sufficient. I mostly only try the others now when the Firefox result doesn’t make sense or the language is unsupported.