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.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Support Center:
Email Address
Optional, but our team may contact you for more information.
Like this Article?

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Write New!
Do you want to publish a tutorial to our support center?

News / Announcements

SSL Certficate Warnings
Updated 2014-04-14 11:34 am EST
Hits: 2218
Heartbleed 0-day OpenSSL security bug
Updated 2014-04-14 04:43 pm EST
Hits: 5640

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

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!