minbrowser / min

A fast, minimal browser that protects your privacy
https://minbrowser.org/
Apache License 2.0
7.95k stars 703 forks source link

Implement on-device page translation #2479

Open ccybc opened 2 months ago

ccybc commented 2 months ago

I want to integrate local translation, the network translation speed is too slow 。Where did the translation change to local?

ccybc commented 2 months ago

Libre Translate

PalmerAL commented 2 months ago

The translation feature has always used LibreTranslate (we run our own instance: https://translate-api.minbrowser.org/).

It would be super cool to make it run offline, probably by using the same models that Firefox does: https://github.com/mozilla/translate. Contributions are welcome on this!

ccybc commented 2 months ago

I'm from China, and LibreTranslate is too slow to work through the Internet. China has not yet found a particularly good browser to translate the entire web page, or Microsoft EDGE, which is too slow to translate. I want LibreTranslate to be configured locally, even if it's bigger

PalmerAL commented 2 months ago

If you set up your own instance of LibreTranslate, you can change the URL used in Min here: https://github.com/minbrowser/min/blob/b2c6cd7e5fda271e7f388d0cd1398fc791d9a1a5/js/pageTranslations.js#L6