Another translation plugin based on plugin:translation and plugin:multilingual
Compatible with DokuWiki
2009-12-25
Similar to multilingual, translation
This is a fork of translation plugin (also have some features from multilingual plugin). This plugin shows a list of available translations for a page.
There are a few limitations:
See also advantages and comparison of translation plugins.
Download and install the plugin using the Plugin Manager using the URL given above. Refer to Plugins on how to install plugins manually.
URL:
Similar to translation (version 2009-10-25) or multilingual (version 2009-02-11).
main.php (or put it in a lib/tpl/default/pageheader.html file for the default template)<?php $translation_plugin = &plugin_load('syntax','translation'); if ( $translation_plugin ) { if ( !plugin_isdisabled($translation_plugin->getPluginName() ) ) { print $translation_plugin->_showTranslations(); } } ?>
Note: add this piece of code not at the top or the bottom of main.php but instead in-between where it makes the best optical impression. You need to experiment a bit to find the best spot.
In default template it should be beetwen:
<?php if($conf['breadcrumbs']){?> <div class="breadcrumbs"> <?php tpl_breadcrumbs()?> <?php //tpl_youarehere() //(some people prefer this)?>
and
</div>
<?php }?>
<?php if($conf['youarehere']){?>
<div class="breadcrumbs">
<?php tpl_youarehere() ?>
</div>
<?php }?>
If you have several themes or skins installed you need to add this piece of code into each main.php to allow the translation-plugin for every skin.
You should use Config Manager or edit conf/local.php configuration file.
$conf['plugin']['translation']['translations'] = 'pl,en,fr,de,it'; // available languages, should be ISO language two letter code $conf['plugin']['translation']['translationns'] = ''; // namespace where to activate translation (recommended: empty) $conf['plugin']['translation']['skiptrans'] = '^:(plugin|template):'; // what to skip (regexp) $conf['plugin']['translation']['dropdown'] = 0; // use a dropdown list, recommended for more than 5 languages $conf['plugin']['translation']['dropdown2'] = 1; // when dropdown is on show current flag/ISO code near combobox $conf['plugin']['translation']['flags'] = 1; // use flags (images) instead of ISO code (text), not work with dropdown list $conf['plugin']['translation']['description'] = 0; // display text similar to "Translations of this page" (in current wiki language) $conf['plugin']['translation']['blankflag'] = 1; // use blank flag image if flag not exist (instead of text) $conf['plugin']['translation']['translateui'] = 1; // translate wiki ui language in language namespaces $conf['plugin']['translation']['redirectstart'] = 1; // redirect start page into a language namespace using browser language detection $conf['plugin']['translation']['checkage'] = 1; // show notice on possible outdated translations $conf['plugin']['translation']['about'] = 'translation:about'; // page describing the translation process to users $conf['plugin']['translation']['showabout'] = 0; // show link to about translation page $conf['plugin']['translation']['localabout'] = 1; // use localized version of about page (instead of one global about translation page)
See: configuration using Config Manager
Screenshots related to dropdown:
Screenshots related to flags:
Screenshots related to dropdown off andflags off (both):
Screenshots related to blankflag:
Screenshots related to blankflag off:
Screenshots related to description:
Screenshots related to description off:
Screenshots related to showabout:
Screenshots related to showabout off:
See also translation plugin configuration and translation plugin usage.
Advantages over the:
html_wikilink, which may be slow for images)| Plugin | FLEX | Multilingual | Translation | Translation2 | Translation3 |
|---|---|---|---|---|---|
| Author | Vincent Tscherter | Daniel Stonier | Andreas Gohr | Markus Birth | Tomasz Tomasik |
| First version | 2010-02-15 | 2009-02-11 | 2007-06-04 | 2009-02-12 | 2010-11-05 |
| Last updated | 2010-02-15 | 2009-02-11 | 2010-07-18 | 2009-02-12 | 2010-12-05 |
| Compatibility | DW 2010-12-25+ | DW 2008-05-05 | DW 2009-12-25 | DW 2009-12-25 -/+ | DW 2009-12-25 |
| Demo | Yes | Yes | |||
| Position in template | breadcrumbs | breadcrumbs | breadcrumbs | breadcrumbs |
|
| Popularity | 3/10128 | 24/10128 | 340/10128 | 19/10128 | 0/10128 |
| Global translation | No | Yes | Yes | Yes | Yes |
| Local translation | Yes | No | No | No | No |
| Allow limited namespaces | Yes (translationns) | Yes (translationns) |
|||
| Exceptions (config) | - | Yes (skiptrans) | Yes (skiptrans) | Yes (skiptrans) |
|
| Exceptions (page) | - | ~~NOTRANS~~ | ~~NOTRANS~~ |
||
| Warn about outdated translations | No | Yes (checkage) | Yes (checkage) |
||
| Language integration | |||||
| Change wiki ui lang | Not work use_browser_lang) | Yes (translateui) | Yes (translateui) |
||
| Start page redirection | Buggy | Yes (redirectstart) | Yes (redirectstart) |
||
| Menu | |||||
| List | Yes (flags off) | Yes (dropdown off) | Yes (dropdown & flags off) |
||
| DropDown List | No | Yes (dropdown) | Yes (dropdown) |
||
| DropDown List with Flag | No | No | Yes (dropdown2 & flags) |
||
| Flags | Yes (flags) | No | Yes (flags) |
||
| Blank flag | Not work | Yes (blankflag) |
|||
| About translation page(s) and description | |||||
| About translation page | - | Not work about) | Yes (about) | Yes (about) |
|
| Global about translation page | - | Yes | Yes | ||
| Multilang about translation pages | - | No | Yes (localabout) |
||
| Show/hide link to about page | - | Always show | Yes (showabout) |
||
| Show/hide description | - | Always show | Yes (description) |
||
Notes:
I didn't change original author (see translation, which my plugin is based). I think it should be merged with original plugin.
It isn't possible to install/use both translation and translation3.
Section for Translation3 plugin users.
*sigh* was it really necessary to have yet another for of the same plugin? why not send patches, or better fork at github and send pull requests? — andiAndreas Gohr
andi
Berlin Germany 2010/11/05 14:59+1 — bugbug
Strasbourg 2010/11/05 16:19I forked project at github. See this.