LibreTranslate -- for on-the-fly translations. 100% offline, open source, self-hosted, PHP compatible API

Might make quite the companion for Nextcloud. Self hosted translation service, which is comparable to Google Translate and DeepL.

Try it here
Main project github
PHP interface to the open source LibreTranslate Project
Also supports this forum via the Discourse Translator app. Setup details on main project github page.
Argos is the training set used by LibreTranslate.

2 Likes

Pretty sweet. I’ll have to set aside some time to get it running on my server. I wonder if someone will make a Nextcloud plugin.

1 Like

Wow, I didn’t know LibreTranslate. It seems really a nice piece of code. Having it as a Nextcloud plugin would be really great!

I just came up with the idea of comparing some well-known online-translators against Libretranslate.

First Take: (official Announcement, En –> De)
Article 1.
All human beings are born free and equal in dignity and rights.They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.
Article 2.
Everyone is entitled to all the rights and freedoms set forth in this Declaration, without distinction of any kind, such as race, colour, sex, language, religion, political or other opinion, national or social origin, property, birth or other status. Furthermore, no distinction shall be made on the basis of the political, jurisdictional or international status of the country or territory to which a person belongs, whether it be independent, trust, non-self-governing or under any other limitation of sovereignty.
Article 3.
Everyone has the right to life, liberty and security of person.
Article 5.
No one shall be subjected to torture or to cruel, inhuman or degrading treatment or punishment.

Deepl com

Artikel 1.
Alle Menschen sind frei und gleich an WĂĽrde und Rechten geboren; sie sind mit Vernunft und Gewissen begabt und sollen einander im Geiste der BrĂĽderlichkeit begegnen.

Artikel 2.
Jeder Mensch hat Anspruch auf alle in dieser Erklärung verkündeten Rechte und Freiheiten, ohne irgendeinen Unterschied, etwa nach Rasse, Hautfarbe, Geschlecht, Sprache, Religion, politischer oder sonstiger Überzeugung, nationaler oder sozialer Herkunft, Vermögen, Geburt oder sonstigem Stand. Ferner darf keine Unterscheidung aufgrund des politischen, gerichtlichen oder internationalen Status des Landes oder Gebietes gemacht werden, dem eine Person angehört, gleichgültig, ob es sich um ein unabhängiges Land, ein Treuhandgebiet, ein Gebiet ohne Selbstverwaltung oder ein Gebiet mit einer anderen Einschränkung der Souveränität handelt.

Artikel 3.
Jeder hat das Recht auf Leben, Freiheit und Sicherheit der Person.

Artikel 5.
Niemand darf der Folter oder grausamer, unmenschlicher oder erniedrigender Behandlung oder Strafe unterworfen werden.

Google:

Artikel 1.
Alle Menschen sind frei und gleich an WĂĽrde und Rechten geboren. Sie sind mit Vernunft und Gewissen ausgestattet und sollen brĂĽderlich miteinander umgehen.

Artikel 2.
Jeder hat Anspruch auf alle in dieser Erklärung verankerten Rechte und Freiheiten, ohne irgendeinen Unterschied, etwa nach Rasse, Hautfarbe, Geschlecht, Sprache, Religion, politischer oder sonstiger Anschauung, nationaler oder sozialer Herkunft, Vermögen, Geburt oder sonstigem Stand. Darüber hinaus darf keine Unterscheidung auf der Grundlage des politischen, gerichtlichen oder internationalen Status des Landes oder Territoriums getroffen werden, dem eine Person angehört, unabhängig davon, ob es unabhängig, treuhänderisch, nicht selbstverwaltet oder unter irgendeiner anderen Einschränkung der Souveränität steht.

Artikel 3.
Jeder hat das Recht auf Leben, Freiheit und Sicherheit der Person.

Artikel 5.
Niemand darf der Folter oder grausamer, unmenschlicher oder erniedrigender Behandlung oder Strafe unterworfen werden.

Libretranslate

Artikel 1
Alle Menschen sind frei und gleich in WĂĽrde und Recht geboren. Sie sind mit Vernunft und Gewissen ausgestattet und sollten in einem Geist der BrĂĽderlichkeit aufeinander zu wirken.

Artikel 2
Jeder hat Anspruch auf alle Rechte und Freiheiten, die in dieser Erklärung festgelegt sind, ohne jede Art, wie Rasse, Farbe, Geschlecht, Sprache, Religion, politische oder andere Meinung, nationale oder soziale Herkunft, Eigentum, Geburt oder anderen Status. Ferner wird auf der Grundlage des politischen, gerichtlichen oder internationalen Status des Landes oder Gebiets, zu dem eine Person gehört, unabhängig, vertrauensvoll, nicht selbstständig oder unter einer anderen Einschränkung der Souveränität nicht unterschieden.

Artikel 3
Jeder hat das Recht auf Leben, Freiheit und Sicherheit der Person.

Artikel 5
Niemand wird einer Folter oder einer grausamen, unmenschlichen oder erniedrigenden Behandlung oder Strafe unterworfen.

As a comparison: Official translation of the text

Artikel 1
Alle Menschen sind frei und gleich an WĂĽrde und Rechten geboren. Sie sind mit Vernunft und Gewissen begabt und sollen einander im Geiste der BrĂĽderlichkeit begegnen.

Artikel 2
Jeder hat Anspruch auf alle in dieser Erklärung verkündeten Rechte und Freiheiten, ohne irgendeinen Unterschied, etwa nach Rasse, Hautfarbe, Geschlecht, Sprache, Religion, politischer oder sonstiger Anschauung, nationaler oder sozialer Herkunft, Vermögen, Geburt oder sonstigem Stand.
Des weiteren darf kein Unterschied gemacht werden auf Grund der politischen, rechtlichen oder internationalen Stellung des Landes oder Gebietes, dem eine Person angehört, gleichgültig ob dieses unabhängig ist, unter Treuhandschaft steht, keine Selbstregierung besitzt oder sonst in seiner Souveränität eingeschränkt ist.

Artikel 3
Jeder hat das Recht auf Leben, Freiheit und Sicherheit der Person.

Artikel 5
Niemand darf der Folter oder grausamer, unmenschlicher oder erniedrigender Behandlung oder Strafe unterworfen werden.

1 Like

second take: some random thread from the german forum (De → En)

Moin moin,
ich hoffe, ihr könnt mir helfen. Meine Cloud wird von meinem Arbeitgeber mitbenutzt, um mir mitzuteilen, wann ich welche Termine habe. Das Vorzimmer trägt sie dann immer ein.
Deshalb ist es so wahnsinnig wichtig fĂĽr mich, dass das folgende Problem bald behoben ist:
1. Der User meikemeyer (geändert) kann sich nicht mehr einloggen. Jedoch erscheint keine Fehlermeldung, wie z.B. als wäre das Passwort falsch.
2. Das Problem tritt geräte- und browserübergreifend auf und ist ebenfalls unabhängig vom Netzwerk (auch über Mobilfunk probiert und mit meinem Account am Mac klappt es auch)
3. Der Login funktioniert auch nicht, wenn ich einen neuen User (auf die gleiche Mailadresse) erstelle.
4. Keine Fehlermeldung in nextcloud.log oder syslog sichtbar
Ăśber Hilfestellungen bzw. Hinweise wĂĽrde ich mich sehr freuen. Ich wĂĽnsche Euch noch ein erholsames Wochenende.
Viele GrĂĽĂźe!

Deepl com

Hello,

I hope you can help me. My cloud is shared by my employer to tell me when I have which appointments. The front office always enters them.
That’s why it’s so insanely important for me that the following problem is fixed soon:

  • The user meikemeyer (changed) can no longer log in. However, no error message appears, as if the password was wrong.
    
  • The problem occurs across devices and browsers and is also independent of the network (I also tried it via mobile phone and it works with my account on the Mac).
    
  • The login also does not work when I create a new user (to the same mail address).
    
  • No error message visible in nextcloud.log or syslog.
    

I would be very happy about any help or hints. I wish you a relaxing weekend.

Many greetings!

Google:

Good Morning, I hope you can help me. My employer uses my cloud to let me know when I have which appointments. She then always enters the antechamber. That’s why it’s so incredibly important to me that the following problem will be fixed soon: 1. The user meikemeyer (changed) can no longer log in. However, no error message appears, e.g. as if the password was wrong. 2. The problem occurs across devices and browsers and is also independent of the network (also tried via mobile phone and it works with my account on the Mac too) 3. The login doesn’t work either if I create a new user (to the same email address). 4. No error message visible in nextcloud.log or syslog I would be very happy about help or hints. I wish you a restful weekend.
Many greetings!

Libretranslate

moin moin,
I hope you can help me. my cloud is being used by my employer to tell me when I have some time. the pre-room then always carries it.
therefore it is so incredibly important for me that the following problem is resolved soon:

  1. the user meikemeyer (changed) can no longer log in. However, no error message appears, as if the password was wrong.
  2. the problem occurs across devices and browsers and is also independent of the network (also via mobile radio, and with my account on mac it also works)
  3. the login also does not work when I create a new user (to the same mail address).
  4. no error message visible in nextcloud.log or syslog
    on assistance or wisely I would be very happy. I wish you a relaxing weekend.
    many greet!
1 Like

so now it’s up to you to find more examples and comparisons and then you might wanna decide whether to use libretranslate or not.

Thanks for the service, @JimmyKater! DeepL is known for his good translation quality. I would even bet that the original translation of your first test series was made with DeepL, at least with his help…

LibreTranslate is for sure not so mature than the comercial competitors, but also not so far behind, and it’s open source , it doesn’t rely on proprietary providers and can be entirely self-hosted for free. Very interesting!

I did in addition tranlate the first article of your first test in a loop en → de → en, to check its consistency.

Source text en:
All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.

Initial translation en - de
Original_de: Alle Menschen sind frei und gleich an WĂĽrde und Rechten geboren. Sie sind mit Vernunft und Gewissen begabt und sollen einander im Geiste der BrĂĽderlichkeit begegnen.

LibreT: Alle Menschen sind frei und gleich in WĂĽrde und Recht geboren. Sie sind mit Vernunft und Gewissen ausgestattet und sollten in einem Geist der BrĂĽderlichkeit aufeinander zu wirken.

DeepL: Alle Menschen sind frei und gleich an WĂĽrde und Rechten geboren. Sie sind mit Vernunft und Gewissen begabt und sollten einander im Geiste der BrĂĽderlichkeit begegnen.

Google: Alle Menschen sind frei und gleich an WĂĽrde und Rechten geboren. Sie sind mit Vernunft und Gewissen ausgestattet und sollen brĂĽderlich miteinander umgehen.

Loopback translation result de back to en:
Original_en: All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.

LibreT: all men are free and equal in would and right born. they are equipped with negligence and certain and should work on one another in a spirit of brotherhood.

DeepL: All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should meet each other in the spirit of brotherhood.

Google: All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should treat one another as brothers.

2 Likes

I prefer to have a slightly lower quality translation but without being tracked and watched. I know it’s difficult to completely escape from surveillance but every step we can make towards that is important.