LibreOffice Translate

Hi all!

I hinted at it a couple of times, but now my LibreOffice frontend for OpenNMT has a homepage and all:
There is a Windows OXT (extension package) including all dependencies and a cross-platform one that requires you to install the dependencies yourself.
I’d be very happy if this was useful to anyone and if you need help with getting your translation model to run in LibreOffice, I’ll be glad to assist.
Between the two talks that have slides and video linked on the page, the one at Hacking Machine Learning is probably from a perspective that is closer to you here (i.e. you have the model and add the LibreOffice part).

Best regards



Great work and nicely put together!

Excellent work!

Hello Tom,
Adding machine translation to LibreOffice is very beneficial for low resource languages!
I am having issues while installing the OXT on Ubuntu 18.04
You have mentioned here that some dependencies are needed to make this work on Ubuntu, what are those dependencies?
Here is a screenshot when I try to add Lotranslate.

Thank you,

When I developed this, I fixed a tiny but crucial bug in LibreOffice to provide __file__. You need LibreOffice from Summer 2019 or so. Happily on Ubuntu, any newer LibreOffice should work (as it uses the system Python). Alternatively, you could manually fix your libreoffice like this:

Best regards


I reinstalled to the latest version of LibreOffice, I am still having issues.
Here is a screenshot:

Uhuh. The installation is less nice than it should be!
When you are in the snap, you don’t have the dependencies available. :frowning:
Staring down the error message, it says “cannot find simplejson”.

Supporting the snap means I would have to package for each LibreOffice version (like on windows). The oldfashioned Linuxer in me had hoped people would use the packages from the distro (the ones too old on Ubuntu 18.04) - probably the ones from 20.04 LTS would work.
As this is cumbersome for you, let’s do this:

  • If you’re feeling adventurous, there are several things to try:
    • Install LibreOffice from 20.04 LTS. This should work with the OXT as provided.
    • Install the simplejson dependency in the snap.
      This could be done using PIP or the extension mentioned in
      a related github issue.
  • If you don’t, I’ll try to get to providing an OXT that works with the snap next week.

Best regards


Hello Tom,
I will give it a try.
It will still be nice to have an updated OXT that simply works out of the box. I might be able to solve the issue, but many LibreOffice users - with no programming background - will be left out.
Looking forward for your update!