14 ms·
Firefox Translations: Translate websites in your browser without using the cloud
- dontbenebby 4y agoThanks for this! I’ve been using Firefox since it was Firebird. It’s critically important thing like this be done offline whenever possible. (Trust me.)
- semireg 4y agoI know this is FF… but could this kind of tech exist in the chromium instance of an electron app? If so, that’d sure be a nice alternative to me having to go about translating it “the hard way.” Fwiw, my electron app is React-based.
- PaulKeeble 4y agoTranslates websites in your browser without using the cloud, a different approach to that of google, should protect privacy better. It doesn't handle mixed pages well unfortunately (so the other languages in my RSS feed are not being detected) and I can't force it to translate the pages but otherwise it seems to do a similar job.
- Jap2-0 4y ago> I can't force it to translate the pages I see both an icon on the right end of the address bar I can click to manually translate pages, and the ability to click on the addon from the extensions list in the toolbar to open a popup to translate arbitrary text.
- askhan 4y agoAlso Simple Translate, which uses Google so presumably less or no privacy, but it does handle mixed pages by translating any selected text https://addons.mozilla.org/en-US/firefox/addon/simple-translate/ https://addons.mozilla.org/en-US/firefox/addon/simple-transl... Great for a web-based RSS reader with feeds in multiple languages onscreen...
- devit 4y agoWow, finally! The lack of working translation was the biggest reason to use Chromium instead of Firefox. And being local is great, and the quality even seems quite good.
- pessimizer 4y agoTranslation by Google/Yandex already worked smoothly in Firefox. The reason this post is neat is because the translation is done offline. Regular cloud translation: https://github.com/FilipePS/Traduzir-paginas-web https://github.com/FilipePS/Traduzir-paginas-web
- nixass 4y agoThis is by far the best translator I've ever used on FF
- pessimizer 4y agoFirefox's CEO makes $6MM a year, the maintainer for translation in Firefox gets paid $95 Patreon-bucks a month. It's insane.
- vanilla_nut 4y agoI use Librewolf as my main browser, instead of Firefox. I understand that Librewolf is a fork of FF, so it's not necessarily 100% API compatible with FF addons. But especially without network access, I wonder why Firefox Translate won't work in Librewolf. Maybe Librewolf disables some ML/AI features? It's a shame; I'd like to use FF Translate instead of Google Translate. But Mozilla's telemetry and frequent style changes that break my Userchrome.css styling are a bit of a dealbreaker.
- okasaki 4y agoYou can block telemetry with a hosts file[0], and update less often by running ESR. 0: https://github.com/MrRawes/firefox-hosts https://github.com/MrRawes/firefox-hosts
- warkdarrior 4y ago> You can block telemetry with a hosts file Are you talking about Firefox or Chrome?
- autoexec 4y agoYou shouldn't have to block it with your hosts file for firefox since you can just disable it.
- LinuxBender 4y agoTaking a look at the domain names it appears that would also break updating addons not just the browser updates, so all preferred addons would have to be mirrored and installed locally.
- okasaki 4y agoIf you're running Debian you can also let the system package manager handle it, eg webext-ublock-origin.
- andrenatalbr 4y agoTelemetry can be disabled on: about:addons -> Firefox Translations -> Preferences and then disabling "Report high-level user interaction" and "Report errors"
- sand500 4y agoAmazing this can all fit in 3MB > called Project Bergamot. The ultimate goal of this consortium was to build a set of neural machine translation tools that would enable Mozilla to develop a website translation add-on that operates locally, i.e. the engines, language models and in-page translation algorithms would need to reside and be executed entirely in the user’s computer, so none of the data would be sent to the cloud, making it entirely private. > In addition to that, two novel features needed to be introduced. The first was translation of forms, to allow users to input text in their own language that is dynamically translated on-the-fly to the page’s language. The second feature was quality estimation of the translations where low confidence translations should be automatically highlighted on the page, in order to notify the user of potential errors. https://blog.mozilla.org/en/mozilla/local-translation-add-on-project-bergamot/ https://blog.mozilla.org/en/mozilla/local-translation-add-on...
- stlee42 4y agoit doesn't fit in 3MB. you can see the model sizes here: https://gist.github.com/jelmervdl/1a48816e4c3643ff5d9e1fd6821bc499 https://gist.github.com/jelmervdl/1a48816e4c3643ff5d9e1fd682... they are like 15MB per language pair each way
- GekkePrutser 4y agoStill impressive. It works pretty well and without that cloud that Google likes to tell us we really need. Google is a bit better of course with many common expressions but I'm sure that can run locally too if they'd want to. Mozilla just has don't catching up to do because they don't monetize our data. So less budget to work with.
- MMAesawy 4y agoWith the Google Translate app you have the option to download languages for offline use, and it's not hidden behind 10 menus or anything.
- 4y ago
- ezconnect 4y agoToo bad there's no Japanese or Korean translation :(
- 6yyyyyy 4y agoWhich is especially surprising when they have a Japanese character in the logo.
- KVFinn 4y ago>Too bad there's no Japanese or Korean translation :( It's interesting that they have Icelandic, a language spoken by 350,000 people. I'm often surprised seeing Icelandic has a full audio dub on a Disney or Netflix movies, above languages spoken by 100X or more speakers. That can't be an economic decision. Anyone know why Icelandic punches above its own weight? Or is it because it has so few speakers that people do dubs to help preserve it?
- tinus_hn 4y agoThe engine is funded by the European Union so it prioritizes translators for European languages over Japanese.
- jelmervdl 4y agoI don’t know about Disney, but in (European centred) machine translation we often pick Icelandic and Maltese as first languages to do specifically because they’re small but familiar enough as tests for the pipeline.
- AdmiralAsshat 4y agoI've just installed it, and I'm impressed so far. I've only run it against some sample German Wikipedia articles (https://de.wikipedia.org/wiki/Clan_of_Xymox https://de.wikipedia.org/wiki/Clan_of_Xymox), but it produces surprisingly readable text. I also particularly like the "highlight potential errors" option to flag stuff that even the translation service thinks might be a bit off. It's not nearly as speedy as Google Translate, but I'll take that happily if it means keeping it local.
- skorpeon87 4y agoIt seems to work brilliantly with Russian. Less than 5 seconds to translate a medium length wikipedia article on my computer. This exceeds my hopes and expectations.
- jelmervdl 4y agoTo be fair, Wikipedia basically appears in its entirety in the training data. It’s a good test to see whether the translation model and all the plumbing works well, but not whether the model generalises well.
- vanderZwan 4y agoHonest question: there's plenty of articles on wikipedia where different language versions of a page are vastly different (it feels like the majority in my experience, but that's no proof of course), how would that be useful as training data unless heavily curated?
- jelmervdl 4y agoThe datasets these models are trained on are sentence pairs. So even if just a couple of sentences between two wikipedia sites are direct translations of each other, they will have appeared in the training set. They don’t have to have appeared on the same topic page, it could be that English Wikipedia has a whole category for a topic while Estonian Wikipedia has just a long single page, direct translations will still be identified and used in training. I also think that the domain and the type of language used on Wikipedia is pretty consistent which will help a lot with unseen sentences. By no means are these models bad! It’s just that Wikipedia is a particularly easy test for them.
- Zardoz84 4y agoReally great to avoid using Google Translate
- marcodiego 4y agoWhat is a good simple to use open-source app or lib that is able to do translations locally?
- depereo 4y agohttps://browser.mt/software https://browser.mt/software
- marcodiego 4y agoI saw that, but I'd like something more directly usable.
- jelmervdl 4y agohttps://translatelocally.com/ https://translatelocally.com/ The website isn’t pretty but it’s the same tech as the browser extension. It came out of the same research project. But because its optimised native code, and not limited by single threaded wasm, waaay faster! Edit disclosure: I worked on that project, and this software.
- friend_and_foe 4y agoIs there source code available for this?
- stlee42 4y agoclick the link that says "Support site" https://github.com/mozilla/firefox-translations https://github.com/mozilla/firefox-translations
- dinosaurdynasty 4y agohttps://github.com/mozilla/firefox-translations https://github.com/mozilla/firefox-translations
- ForHackernews 4y agoFirefox is infinitely superior to Chrome. It might not be the more technically impressive browser, but in every way that really matters it is strictly better.
- tomxor 4y agoThis is the future. So many things can be unclouded, and provide a better user experience for it (which is how we win).
- autoexec 4y agoI wish I had your optimism. I suspect the opposite though. A better user experience was never the goal of cloud services. Providing translation and other services in the cloud gives companies massive amounts of data about you that they can leverage to their advantage and gives them opportunities to control and shape what we're allowed to do or see. As long as that stays true there will always be a push for users to give up more control and become more dependent on third parties. I want to live in a future where more things are done locally and independently, but things are headed in the other direction and there's a lot of money and power behind preventing the pendulum from swinging back. I'll do what I can to fight the trend though, and if this add-on really works as advertised I'll gladly use it.
- jelmervdl 4y agoI think doing machine translation in the cloud makes more sense commercially (easier to monetise) and is a lot less challenging (better hardware, model sizes less of an issue, fewer worries about exposing proprietary code or models). But I agree that this local experience should be the future. It’s good to have the control and independence.
- anthk 4y ago
- stlee42 4y agoprevious discussion here: https://news.ycombinator.com/item?id=31596888 https://news.ycombinator.com/item?id=31596888 as noted in [0], the models are hosted on storage.googleapis.com and downloaded on demand. this still seems to be the case [1] 0: https://news.ycombinator.com/item?id=31604095 https://news.ycombinator.com/item?id=31604095 1: https://github.com/mozilla/firefox-translations/blob/main/extension/model/modelRegistry.js#L5 https://github.com/mozilla/firefox-translations/blob/main/ex...
- GekkePrutser 4y agoWeird. Why give your biggest competitor insight in your usage numbers??
- s3p 4y agoI feel like it won't matter. FF translation usage statistics will be a small fraction of Google's, and I can't imagine them even being interested at that kind of data. Since it's an add on (vs. Chrome auto translation by default), it probably won't be adopted by much of the browser userbase.
- andrewxdiamond 4y agoIt is illegal for GCP to give that information to Chrome. pretty blatant antitrust violation
- andrenatalbr 4y agoNo usage data is sent to Google. Only the models are stored on GCS under Mozilla's account and tracking is not even an option.
- GekkePrutser 4y agoThey can still tell the number of downloads, thus the number of users using this when a new language model update is released.
- autoexec 4y ago
- skorpeon87 4y agoAbsolutely brilliant! I hope they eventually ship this with firefox by default. I doubt I would have heard of this extension if not for this HN post; shipping it by default would probably be useful to many people.
- GekkePrutser 4y agoThey just changed something though that breaks it for me. Previously there was a manual translate button. Now you can only set up automatic translation with an exception list. This is really annoying for me, I'm learning Spanish and I like to switch between the original and the translation. Now that option is suddenly gone.
- skorpeon87 4y agoDid you accidentally press the "Translate this tab automatically as you browse" button? Maybe try in a new tab.
- GekkePrutser 4y agoI thought it was something like this at first but no. It suddenly happened around the update to 107 and happens for every site and container. Maybe a bug? Ps: I'm on FreeBSD for which mozilla doesn't make a version so I'm using a community release. It's been working totally fine though for years with the exception of D Hardware DRM which is just not supported on FreeBSD (and I agree with that)
- skorpeon87 4y agoSounds like a bug, I'd try it in a fresh profile and see it still behaves that way for you. I just installed the extension a few minutes ago and it's translating manually when I click the button.
- GekkePrutser 4y agoAh ok thanks for trying that!! I thought it was just the way it was from now on. FWIW for me that button is not even appearing anymore.
- andrenatalbr 4y agoThis is definitely not the right behavior. Could you please file an issue with steps to reproduce or mail the team (address is in the addon page)
- eye_street 4y agoI'd like this to be able to translate just a selection, like Safari can do.
- Zuiii 4y agoPlease open a github issue and let them know.
- kneebonian 4y agoIf this is part of what Mozilla has been working on then hats off to them. Hopefully this like the iPhone a harbinger of things to come and not a Watson a last dying gasp.
- soganess 4y agoI'm a long-time firefox user and very vocal hater. That said, I've had less and less to hate with each update. I used to hate ff mobile(too slow). I used to hate the browser on Linux(no Wayland, no hardware video, weak multi-process). But all that has been fixed. Plus, cookie isolation, auto cookie banner management, HTTPS preferred, and mobile extensions. Not to mention the promise to support content filtering extensions. Add to that local translation! FF is the best it has ever been and somehow it is losing user share faster than ever. I used to get all the hate, but now at days... I'm just not sure. I'd love to know why.
- autoexec 4y ago> Add to that local translation! FF is the best it has ever been and somehow it is losing user share faster than ever. I used to get all the hate, but now at days... I'm just not sure. I'd love to know why. I'm also a long time fan of firefox, but it does seem like there's always something I have to disable or fix with every major update. Firefox has always claimed to be very pro-privacy, but they don't always live up to that with their actions (From a privacy perspective perhaps the biggest slap in the face was Pocket). Even here "local translation" means that Firefox needs to repeatedly ping Google's servers in order to download the models. Still better than letting Google translate the contents of a page, but far from ideal from a privacy standpoint. As it stands I have modifications to over 100 settings in about:config that have to be made with each fresh install of firefox to get it locked down properly. Firefox is still the best browser out there because it gives you the ability to disable all that stuff, but its still a pain. User share is always going to suffer because for most people their phones come with something else already, their PCs and tablets do too, and they don't know any better. They don't see or understand the problems with using chrome so why look for a browser that gives them better solutions? I use firefox because I care about my security and privacy. If I didn't care about that I'd use Chrome or whatever Microsoft is shipping these days too because I know sites will make sure their stuff works in those browsers. All the hate I have for firefox comes from a place of love. I care about firefox. I depend on it. I want firefox to be better. Often that means I'm calling them out on their bullshit, bitching about the extra work they're giving me after updates, or just mentioning how they could have done better. Firefox users complain about firefox because if they didn't care enough to complain they'd just be using chrome.
- autoexec 4y agoThis is a good start, but it's worth noting that this still sends data to Google (they host the models) and this doesn't work offline. If they can fix those two things I think this is great.
- voxelghost 4y agoAny chance of support for Japanese in the nearish future?
- andrenatalbr 4y agoThat's in the roadmap, yes.
- thdc 4y agoI came across an add-on that leveraged the same models for translation a while back but with a very different ui/ux that I preferred https://github.com/rei2hu/berga-translator https://github.com/rei2hu/berga-translator (lets you manually upload/manage the models and perform translations in page)
- xeonmc 4y agoSo, do we call them "FFT" then?
- plaguepilled 4y agoLOL yes, if their market share increases after rapid app improvements we could call it a Fast Firefox Transformation
- akomtu 4y agoFirefox Narrator is what I need. Translator from rare languages would be great, but ML isn't quite there yet.
- Gentil 4y agoTLDR: So Firefox is trying to cater to general audience NOW. To increase the user base with features and what not. But a noteworthy amount of them have already left Firefox cos of inconvenience and broken websites pre-quantum (v57). And they definitely are pissing their current loud and vocal "power users" with MDN layoffs and many more reasons. I see that the main comment is about why Firefox is hated/losing market share. Let me try and share my guess/assumption. I could be wrong. So do share any counter opinions you may have. People really do forget that Firefox is more than just a piece of software. Firefox stands for privacy, ethics and a lot more. It's user base and the community around it is looking for something that is far more than a piece of software based on technical merit. Keep this in mind as you read the rest. When Firefox quantum was released, I had just moved to Chrome finally. It had just been a month or so. Before quantum, Firefox was horrible, slow and bulky. Firefox lost majority of the "average" users around this point. Because many websites broke with important things like Google Meet not working. This left Firefox with a user base of enthusiasts and privacy nerds or power users. For good chunk of the userbase who are very local. Firefox has been ignoring the community and things like MDN layoff while CEO is getting paid is not a good mark. How community volunteers are ignored is a good thing to keep in mind. I will not go there. Research them. A lot of community volunteers have posts about it. Keep in mind that Mozilla is still spending a crazy amount and wasting money on these events while ignoring what made it good. Money that they don't have. And now, Firefox enthusiasts are perplexed on why Firefox is not gaining any ground. We should stop looking at it from technical merit alone. Then you will have the answer. I don't see Firefox as some great movement for freedom anymore due to current leadership. While I understand the need for a browser with a different browser engine, I am not at all invested on Firefox emotionally. A lot of the conversations I recently have with others says the same. They like me are ready to ditch Firefox any day. That being said, let me clarify that Firefox is really good these days. But I do think it might be really late to get a noticeable amount of general audience.
- Zuiii 4y agoHey Mozilla! I would really, really, love a similar add-on that can summarize web pages for me. Many webpages write 10 minute articles that contain 30 seconds worth of information. An add on that can summarize wall-of-text comments and entire articles would be very valuable to people like me.
- tommica 4y agoAwesome, need to install this!
- beagle3 4y agoRecent version also added a toolbar button with a box you can just copy text into and get a translation, which is awesome. The first release translated endless twitter scroll inline perfectly. Unfortunately, this stopped working for me - either a Firefox update or a translations update - so I actually have to use this box often.
- andrenatalbr 4y ago> The first release translated endless twitter scroll inline perfectly. This is the right behavior and it's still working for me. Could you please file an issue to: https://github.com/mozilla/firefox-translations/issues https://github.com/mozilla/firefox-translations/issues with your STRs?
- Animats 4y agoThat's useful. Can it be extended to Asian languages? Most of the supported languages have common roots.
- vinay427 4y agoYes, all of the current and in-development languages listed have common roots except for Estonian.
- Markoff 4y agoThe real question is - is it any good? I recently compared various translators including Bing, Yandex, Baidu Fanyi and who knows what else and my result was DeepL beating everyone with their neural MT (which I don't think can be done offline), followed by pretty much tie between Google Translate and Reverso (which also use neural MT, same as DeepL and also their website is also confusingly very similar to DeepL, almost like clone). Sometimes GT is better than DeepL, sometimes Reverso, but most of the time DeepL delivers the best translation, followed by GT, which is usually followed by Reverso. But considering 2 of these use neural MT I can't imagine how good/bad is Firefox with offline translation.
- camgunz 4y agoI've been using this for a few months and I love it. I will take this opportunity to gripe though and say that it doesn't handle DOM changes, e.g. if you're going through a form and you click an expander, the contents of that expander won't be translated if it was dynamically inserted into the DOM. This is more or less any AJAX request, or React/Vue component with its own data calls, etc. As a result, I often find myself falling back to Chrome if I need translations (recently moved abroad). Also, it would be great if the models were cached. If I don't click "translate this tab automatically as I browse" I'll download the whole model on every page load. Not great if you're tethered to your phone :(
- jelmervdl 4y agoThat must be a bug. There is a lot of code in the extension specifically to make it track DOM changes and push translations for those as they happen. React pages are especially tricky to translate as the framework does not take kindly on external JavaScript swapping out text nodes. There’s code in the extension to work around that.
- andrenatalbr 4y agoDOM changes should be handled and it should be working still. Could you please file a bug https://github.com/mozilla/firefox-translations/issues https://github.com/mozilla/firefox-translations/issues with the proper steps to reproduce, please?
- camgunz 4y agoOh! They work now! Hell yeah nice :)
- andrenatalbr 4y agoI'm glad to hear.
- megablast 4y ago> A CPU that supports SSE4.1 extensions is required for this addon to function properly. If it doesn't, an error will be displayed when the translation is being started. Obviously. Replacing text is a huge CPU intensive task.
- m_eiman 4y agoFWIW it works on M1 Macs, I suppose they same something equivalent to SSE4.1.
- jelmervdl 4y agoIt is running a full transformer type neural network on your cpu, it needs all the speed it can get. It’s because the translation engine requires at least SSSE3.1 instructions[1]. These are translated to wasm SIMD instructions[2] which are only enabled by browsers if the underlying hardware is there to execute these at least somewhat efficient. [1] https://github.com/browsermt/bergamot-translator/issues/418 https://github.com/browsermt/bergamot-translator/issues/418 [2] https://emscripten.org/docs/porting/simd.html https://emscripten.org/docs/porting/simd.html
- _def 4y agoThis is nice for translating whole sites. As a non-native english speaker, what I often want is to translate single words. I hope this add-on can provide this feature as well in the future.
- Vinnl 4y agoYou can do that using the toolbar button since a recent version.
- 727564797069706 4y agoTranslation is pretty much the only reason I still use Chrome. Great to see that Firefox tries to solve this blocker! Downside is that the language I mainly need it for is not in the list yet.
- aqme28 4y agoThat shouldn't have been a blocker. I've been using this extension for a while that does the same thing as Chrome https://addons.mozilla.org/en-US/firefox/addon/traduzir-paginas-web/ https://addons.mozilla.org/en-US/firefox/addon/traduzir-pagi...
- sushidev 4y agoAnyone checked if it's safe to install?
- parski 4y agoThis is awesome. I've been missing this feature for years!
- sendfoods 4y ago> Translate websites Just installed it, but how does it translate "websites"? The description states that is translates text input, entered manually. What am I missing?
- piskerpan 4y agoLove it. But all the languages are pretty similar to each other, I’d argue. I want to see it working with some exotic language like Mandarin. Most translators deliver hilarious results when translating Japanese for example.
- college_physics 4y agoThis is amazing stuff. Would it be possible to show the original and the tranlation side by side (on desktop)? I suppose you can do this manually with two windows etc but an option to render them automatically next to each other could be a great language learning tool.
- hutzlibu 4y agoSadly not for firefox mobile. Is there a fundamental difference between FF desktop extensions and mobile extensions? I would be fine using it, with ugly UI, not optimized for mobile ..
- solarkraft 4y agoSo cool! THIS is the Mozilla I want to see more of!
- deleted 4y ago[deleted]
- jonesdc 4y agoCan anyone recommend a good dictionary addon for Firefox?
- Quenz 4y agoSimple, recommended by Firefox [0], has light/dark theme [1], more customizable and pretty but not open source [2]. I've not used these extensively. [0] https://addons.mozilla.org/addon/dictionary-anyvhere/ [1] https://addons.mozilla.org/addon/english-popup-dictionary/ [2] https://addons.mozilla.org/addon/lumetrium-definer/
- butz 4y agoIs there anything a user could do to help in adding more languages? Or we just have to sit tight until they might be added one day?
- Aldipower 4y agoI am impressed. This works with my React app without crashing it! Google Translate crashes my React app because it modifies some the DOM in the way React cannot deal with it.
- 8bitsrule 4y agoA potential improvement I ran across today: a paragraph of German included in an English-language page was not translated. Didn't see a way to select it and click 'translate'. There also doesn't seem to be a way to highlight parts that were poorly-translated and then 'report' them.
- Mick-Jogger 4y agoDoes anyone have an alternative for Android phones? Missing translations is the only thing that annoys me daily-driving Firefox on Android.
- m4rtink 4y agoYeah, I guess its still a no-Go due to the botched addon support in the regular Android Firefox build ? But maybe in the Nigtly/Beta using that annoying addon list trick ? https://www.androidpolice.com/firefox-beta-107-android-install-any-browser-add-on/ https://www.androidpolice.com/firefox-beta-107-android-insta...
- jokoon 4y agoI wish there was a similar thing for image recognition