karmin.ch
Mail Admin
You are here: karmin.ch » FLEX - Flexible multiLanguage EXtention Dokuwiki Plugin

FLEX - Flexible multiLanguage EXtention Dokuwiki Plugin

The FLEX is a Dokuwiki-Plugin. Other than plugin:translation no separate namespaces are needed to store translations.

Download and Install

  • Download and install the plugin through the Plugin Manager: flex-dokuwiki-plugin-20100215.zip
  • Configure it through the FLEX setup page in the admin tools.
  • Add the following code in the template page main.php
 <?php
   $flex = &plugin_load('helper','flex');
   if (isset($flex)) echo $flex->showTranslations();
 ?>

Note: Add this piece of code neither at the top nor at the bottom of main.php but instead in-between where it makes the best optical impression.
If you have several themes or skins installed you need to add this piece of code into each main.php to allow the
FLEX plugin for every skin.

How to use

1 Using the FLEX-Tag

{{flex>lc_1=pageid_1&lc_2=pageid_2& ....}}
lc_i language code
pageid_i a pageid, namespace including relative can be used as well

Example:

{{flex>en=the_fifth_element&de=das_fuenfte_element&fr=le_cinquieme_element}}

2 Select the Interface Language by Patterns

Set up the interface language for specific pageid patterns by using the FLEX setup page in the admin tools.

Use the follwing format:

regexp   languagecode

Examples

-de$ de
(start|index) en
^klingon tlh

Note: If there is no match, the interface language will be set to the browsers favorite language or if not possible, to the default value.

You could leave a comment if you were logged in.
 
flex/index.txt · Last modified: 2011/05/30 12:29 (external edit)