DokuWiki is capable of making a multil language site. This functionality is not installed in new DokuWiki installations by default. In order to get the multi language functionality to work, you will need to use the "Multilingual Plugin".

The "Multilingual Plugin" does not translate your pages into a language. The plugin makes namespaces particular to the language so pages can be created in a specific language namespace. This plugin is completely different than changing the admin interface language. For information on how to change teh admin interface language in DokuWiki, please click here.

When the namespaces are created, different links are placed in your site that allow visitors to switch to a different language version of your site. The following steps will explain how to use the "Multilingual Plugin" for DokuWiki.

Important! This tutorial is based off of the "DokuWiki" theme. If you are editing a different theme, the location where you place the code may change.

Steps to install the Multilingual Plugin

  1. Download multilanguage plugin DokuWikiGo to the following link and get the link for the plugin.

    https://www.dokuwiki.org/plugin:multilingual

    Unless the version changes, you should have a link like the following:

    http://snorriheim.dnsdojo.com/redmine/attachments/download/29/multilingual-1.0.1.tar.gz

  2. Install multilanguage plugin DokuWikiLog into DokuWiki. Go to Admin > Manage Plugins. Paste the URL in the "Download and Install a new plugin" box.

    Click Download.


  3. Code for multilanguage plugin DokuWikiCreate a file called "show_languages.html" on your server in the following location of your DokuWiki installation directory:
    /lib/tpl/dokuwiki

    Add the following code in the "show_languages.html" file:

    <?php 
      $multi_lingual_plugin = &plugin_load('syntax','multilingual');
        if ( $multi_lingual_plugin ) {
            if ( !plugin_isdisabled($multi_lingual_plugin->getPluginName() ) ) {
              print $multi_lingual_plugin->_showTranslations();
        }
    }
    ?>

    Save the file.


  4. Include for multilanguage plugin DokuWikiNext, edit your lib/tpl/dokuwiki/tpl_header.php. Add the following code towards the end of the file before the <hr class="ally" />.
    <div style="float:left;"><?php  @include(dirname(__FILE__).'/show_languages.html')?></div>

    Your file should look like the image to the right.

    Save the changes.


  5. Settings multilanguage plugin DokuWikiGo back to your DokuWiki admin section and select Configuration Settings. Scroll towards the bottom and you will see the configuration settings for the multilingual plugin. In the first box that says "plugin»multilingual»enabled_langs", enter the languages you want separated by commas. See the image to the right.

    Note! For a list of language codes, see the article on Language code list for PHP programs. Not all languages work with DokuWiki. Unfortunately, there is no list of language codes that work specific with DokuWiki. You will need to trial and error on languages that are not as common.

    When finished, click save at the bottom of the page.


    View of links for multilanguage plugin DokuWikiNow when you go to your home DokuWiki page, The language options will show as links towards the top left of your site. Each language has its own namespace created. When clicking the links they will take you to the language namespace. For example, German will have the de:start namespace.

  6. For information on changing the administrator interface language in DokuWiki, please see our tutorial on How to change the DokuWiki admin language.

Like this Article?

Login to comment.

Your Opinion Matters

... but we need to know what you're thinking!

I'm James Richardson, your friendly Community Support technician, and I wrote the article you're looking at now. I like to think it's perfect, but I'm sure you have some suggestions. Please, let me know what they are!

Feedback
Your Email Address
Because we'd like to talk with you!

Latest Questions

If you need some help, submit your question to our Community!
We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)
Ask a Question!
Recent Questions
  1. Unable to block .RU domains
  2. Email logs - where shall I find log on who, when, IP address, has open a connection
  3. Creating a Cname

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!