DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:deeplautotranslate

This is an old revision of the document!


DeepL autotranslate plugin

Compatible with DokuWiki

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

plugin This plugin automatically translates wiki pages using the DeepL API

Last updated on
2021-12-11
Provides
Action
Repository
Source

Tagged with deepl, language, 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:

  • [ISO-Language-Code]:foo:bar
    • The page with the name foo:bar in the language [ISO-Language-Code]
  • foo:bar
    • The original page with the name foo:bar in your default language

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

  • start
    • Your default german landing page
  • en:start
    • The english translation of the landing page

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

  • direct mode: missing translation pages will automatically be created if you visit it. So for example if you visit en:start and it does not exist it will be translated automatically and the translation will be shown directly.
  • editor mode (default): missing translation pages won't be created by simply visiting it, instead when you open the editor on a missing translations page, the auto-translated page will be pasted in the editor that you can edit and save it.

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).

If you want to retranslate a page, simply delete it and then it will be created again with your specified operating mode.

Configuration and Settings

You can configure the following settings:

  • Required: API-Key
  • Optional: API
    • The DeepL-API for which your key is valid
      • Free-API (default)
      • Pro-API
  • Optional: Default operating mode
    • Set the default operating mode (see explanation above)
      • direct-mode
      • editor-mode (default)
  • Optional: Blacklist regex
    • A regular expression which matches page names that should never be translated automatically
  • Optional: Direct regex
    • A regular expression which matches page names that should always be translated in the direct-mode
  • Optional: Editor regex
    • A regular expression which matches page names that should never be translated in the editor-mode
  • Optional: Ignored expressions
    • Expressions or words that shouldn't be translated. Separated by :. Useful for abbreviations.
plugin/deeplautotranslate.1639287744.txt.gz · Last modified: 2021-12-12 06:42 by NetaliDev

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki