Compatible with DokuWiki
2009-12-25+ 'Lemming'
Similar to multilingual, translation, translation2
This plugin shows a list of available translations for a page. Other than the translation plugin no separate namespaces are needed to store translations.
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.
{{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}}
Set up the interface language for specific pageid patterns by using the FLEX setup page in the admin tools.
Use the following 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.