Translating Doku

v1.0

Every string Doku puts on screen is translatable. They are split across two text domains, and both need translating — the theme owns what readers see, the plugin owns what you see while writing.

PackageText domainTemplate file
Doku (theme)dokudoku/languages/doku.pot
Doku Core (plugin)doku-coredoku-core/languages/doku-core.pot

Set your site’s language first, under Settings > General > Site Language.

With Loco Translate

The path with no files to move:

  1. Install and activate Loco Translate from Plugins > Add New.
  2. Go to Loco Translate > Themes > Doku and click New language.
  3. Pick your language. For Choose a location, pick System — wp-content/languages/themes/.
  4. Translate the strings and click Save. Loco compiles the .mo file for you.
  5. Repeat under Loco Translate > Plugins > Doku Core.

With Poedit

  1. Open doku/languages/doku.pot in Poedit and choose Create new translation.
  2. Translate, then save as doku-{locale}.po — doku-de_DE.po, for example. Poedit writes the matching .mo file beside it.
  3. Copy both files into wp-content/languages/themes/.
  4. Repeat with doku-core.pot, saving as doku-core-{locale}.po into wp-content/languages/plugins/.

The locale has to match the one WordPress is using — the code shown beside your language under Settings > General. de_DE, not de.

Keep translations in wp-content/languages/, never inside the theme or plugin folder. Both of those are replaced wholesale when you update, taking anything you put inside them with it. wp-content/languages/ sits outside both and survives.

Two things to know before you start

  • There is no right-to-left stylesheet. Translating the strings into Arabic, Hebrew or Farsi works, but the layout does not mirror: the sidebar stays on the left and text stays left-aligned. A right-to-left site needs those rules written into a child theme.
  • This translates the interface, not your content. Running the same documentation in several languages at once is a different job, and the multilingual plugins that do it — WPML, Polylang — are not supported in version 1.0.

Was this page helpful?