Table of Contents

DeepL Autotranslate Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" yes
  • 2022-07-31 "Igor" yes
  • 2020-07-29 "Hogfather" yes

plugin This plugin automatically translates wiki pages using the DeepL API

Last updated on
2023-08-24
Provides
Action
Repository
Source
Requires
translation

This plugin automatically creates translations based on the Translation plugin page structure using the DeepL API.

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Examples/Usage

Page structure

To use the plugin, the following page/namespace structure is required:

So for example if your default language is german and you have a namespace for english translations:

Operating Modes

The plugin has two operating modes: the direct mode and the editor mode:

You can configure the default operating mode in the plugin settings. You also can define a regex for page names that should always be handled in a specific mode. Additionally you can define a blacklist regex for page names that should never be auto translated. You can define expressions (words) in texts that should never be translated (abbreviations for example).

Retranslation

If you want to retranslate a page, simply delete it and then it will be created again with your specified operating mode. You can also use the retranslate button in the side menu if you have not disabled it (it is enabled by default).

Push translations

There also is a so called push translation feature in which you can configure languages to which you want to push your translations from the pages in the original language. If you have configured at least one language for which you want to use push translations and the retranslate button is not disabled, the button will also be displayed on the pages in the original language. When you press the button on the page in the original language, it will be translated into all the languages configured for push translations.

When a page in the original language links to pages or media that also exist in the target language, the links also point to the target in the target language. If the link target does not exist in the target language, it continues to point to the one in the original language. The corresponding link texts are also translated by DeepL.

Glossaries

You can use DeepL glossaries to specify a specific translation for specific words. To use this feature, set the namespace for the definitions of the glossaries (e.g. internal:glossaries). When you create the start-page of the glossary definition namespace (e.g. internal:glossaries:start), a template for this page is pasted to your editor. This template contains all supported glossary language pairs for your default language and links to their definition pages.

When you create a glossary definition page (e.g. internal:glossaries:en_de for the EN → DE glossary), a template for a glossary definition page will be pasted to your editor. You can modify the template as you want, but the important thing is: the glossary entries will be generated from the first two table columns (body only) on this page. So you can add more columns if you want and they won't affect the glossary definitions. Caution: the first two columns of all tables on this page will be used to generate the glossary entries.

When you remove all entries from the table or delete the definition page, the glossary will be deleted.

Configuration and Settings

You can configure the following settings:

Changelog