min icon indicating copy to clipboard operation
min copied to clipboard

Implement on-device page translation

Open ccybc opened this issue 1 year ago • 4 comments

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

ccybc avatar Aug 04 '24 16:08 ccybc

Libre Translate

ccybc avatar Aug 04 '24 16:08 ccybc

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!

PalmerAL avatar Aug 04 '24 20:08 PalmerAL

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

ccybc avatar Aug 05 '24 01:08 ccybc

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

PalmerAL avatar Aug 06 '24 02:08 PalmerAL