Feature #1129


Implement Translate API

Added by ask low 3 months ago. Updated 3 days ago.

Start date:
Due date:
% Done:


Estimated time:


Why I need

My friends & some of my family liked Privacy Browser, but they're expecting automatic webpage translate in native language script like how google does in chrome.

Possible Solution

There's LibreTranslate API
Already used by minbrowser on linux.


Libre Translate Google Analytics.png (496 KB) Libre Translate Google Analytics.png Soren Stoutner, 11/28/2023 12:21 AM
Actions #1

Updated by ask low 3 months ago

If implemented, then we can add a domain setting for a default language to be translated in. And that page will always be translated in the selected language, even though it's loaded in a different one.

Actions #2

Updated by Soren Stoutner 3 months ago

Using a cloud translation service has significant privacy implications. I cannot imagine that I would ever implement it into Privacy Browser.

Google has been working on implementing an on-device translation service.

If they ever integrated this with WebView I would be happy to enable it.

Actions #3

Updated by Soren Stoutner 3 months ago

Just as a side note about LibreTranslate, they use Google Analytics to track you, which means that Google also gets all the tracking information. ;)

Actions #4

Updated by ask low 3 months ago

Sad. Btw, on-device translation is only possible through AI with dedicated NPU (neural processing unit) on the device. If not, the whole dictionary translation mechanism offline locally takes a heck lot of storage.

Although, I hate AI so much. Not because it's taking our jobs, but because it's a black box. You throw your garbage data to it & it spits out the answer based on the prompt complexity. Such an absurd lazy idea.

Actions #5

Updated by ask low 4 days ago

Close this, as cloud translation is not possible. And offline translation requires huge amount of library downloads (if such API even exists).

Actions #6

Updated by Soren Stoutner 4 days ago

Google is making a lot of noise about implementing on-device translation. If they do that it can be integrated with WebView, then I would love to enable it in Privacy Browser.

Actions #7

Updated by ask low 4 days ago

Yes but is it through AOSP ? Or through built-in Google Play Services ? If it's latter, then I don't think it's worth implementing it.

Okay, after reading the support page, I think it's Google Translate app that they're referring to. Nop. Nop.

Actions #8

Updated by Soren Stoutner 4 days ago

It all depends on how Google ends up implementing it. As it is, it is not open source and there is no way to integrate it with WebView. But that might change.

Actions #9

Updated by ask low 4 days ago

But might expose their API for any third party usage. If you plan to implement it in the future, beware that f-droid puts a warning on your publish "Promotes non free services".

Actions #10

Updated by Soren Stoutner 4 days ago

If it is a non-free service, I will not use it. But if it becomes a standard, open Android API, then I would use it. And F-Droid would not have any problem with that (in fact, a lot of F-Droid apps would probably use it).

Actions #11

Updated by ask low 4 days ago

I see there are a lot of translate APIs but unfortunately most of them either work through neural engines or not FOSS.

Actions #12

Updated by Soren Stoutner 3 days ago

That's what this is waiting on. It is one of the things Google teased with their release of the Tensor processor. Even if Google doesn't implement a FOSS on-device translator, someone else might.

Until then, Privacy Browser Android will not include any sort of built-in translation, because using any type of service compromises the privacy of the users.

Actions #13

Updated by ask low 3 days ago

Or a better approach would be to just naturally learn English ? Doesn't help with european or eastern languages though.


Also available in: Atom PDF