farside icon indicating copy to clipboard operation
farside copied to clipboard

Feature request: Add LibreTranslate

Open Mennaruuk opened this issue 2 years ago • 3 comments

Free and Open Source Machine Translation API, entirely self-hosted. Unlike other APIs, it doesn't rely on proprietary providers such as Google or Azure to perform translations. Instead, its translation engine is powered by the open source Argos Translate library.

List of instances

Mennaruuk avatar Mar 11 '22 19:03 Mennaruuk

LibreTranslate support isn't currently possible with Farside, since it requires a POST request for all translations, whereas Farside's redirecting behavior relies only on formatting URLs (so only GET requests).

I'll keep this issue open for now though, and I'll consider adding POST request support if there are other FOSS services that require it.

benbusby avatar Mar 18 '22 20:03 benbusby

LibreTranslate can be used with parameters to load needed translate

Code responsible for that

Parameters:

  • source - language to translate from
  • target - language to translate to
  • q - query, obvi

Example: ?source=ru&target=uk&q=кот

NoPlagiarism avatar Jul 20 '23 05:07 NoPlagiarism

@NoPlagiarism nice, thanks for pointing that out. I was going to look into adding it into Farside, but it looks like only one of the listed public instances (https://translate.argosopentech.com) is functional aside from the official libretranslate.com one (which asks to not use without a paid API key for production apps). I'd consider buying an API key if it wasn't more expensive than the actual hosting for Farside.

Either way, I might still add it just so that it's supported, and leave out the official paid instance for now. There also needs to be an update to change Google Translate's sl/tl/text params to source/target/q before the redirect happens.

benbusby avatar Jul 20 '23 16:07 benbusby