Machine Translation

Last modified by Admin on 2024/07/05 18:10

cogAllows to translate content using an external Machine Translation service
Developed by

slauriere, Josué Tille

1 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager


This application allows to translate content using an external Machine Translation. At the moment only DeepL Translator is supported. Other services such as Libre Translate are not supported yet.


Once installed on a multilingual wiki, the application exposes a Translation dropdown menu on each page except the ones which are not translatable (see Administration section). This menu displays the list of available translations and exposes a Translate action allowing to trigger the translation or retranslation of the current page into additional languages.


Hitting the Translate action opens modal listing the available translations if any, with their last date of modification. Additional translations or retranslations can then be launched from the modal, into one or several languages. Once the translation job has completed, the user can return to the translated page in order to access the generated translations.


This design page provides information about the implementation and contains several improvement ideas or new potential features.


In order to use the application, it has to be activated in the administration module, which allows in addition to control the following parameters, as illustrated below:

  • Name of the Machine Translation service to be used (at the moment only DeepL is supported)
  • Machine Translation Service API key
  • Translation location strategy: this parameter allows to choose between storing the translations at the same location of the original document (default option), or to prefix their location with the language key (eg /en/company/ becomes /fr/societe)
  • In case the prefix strategy option is chosen, it is possible to force the use of the same location strategy for specific classes
  • List of class properties to be translated: this is useful when using the prefix naming strategy and translating object fields

The administration screen also displays the current usage of the remote service.


Translation tests can be executed directly from the administrationfor checking that the translation service is correctly configured:


Translation Glossaries

The Machine Translation application can be used in combination with the Glossary Application by installing the Machine Translation Glossary Application.

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki


Dependencies for this extension (org.xwiki.contrib.machinetranslation:machine-translation-ui 1.1.1):

  • org.xwiki.contrib.machinetranslation:machine-translation-api 1.1.1
  • org.xwiki.contrib.machinetranslation:machine-translation-deepl 1.1.1
  • org.xwiki.contrib:macro-job 2.1

Get Connected