Learn about DokuWiki
Learn about DokuWiki
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
This plugin requires Database Connector Plugin.
Translator — Manage your project translations
The Translator plugin helps developers to create translations for multi-language setups of their programs. The data is completely stored in a MySQL Database.
You simply translate the same values (key and value have to be exactly the same on import) only once to have them updated in other categories.
Translators can display
not translated and
translated values to concentrate on either currently empty values or (spell) checking existing values.
The input of the language files must have the following format:
# Key = Value # e.g. dialog.OK = OK dialog.Cancel = Cancel $data['create'] = Create new Page
You will have to edit some settings in the DokuWiki Configuration Manager in order to use the translator. Here you can define the “Master Language” – which is English by default. You can also enter the connection data to your database system containing the translation data.
Prequisite: you need an MySQL database up and running and your PHP has to have the mysqli extension. You'll need to create a database prior to using the plugin.
After having set up the database connection you can access the administration GUI for the translator plugin (from the admin menu) and add translation rights to your users. The List will display all users in your DokuWiki together with an input field where you can add language shortcuts which will be used as identifiers for the languages, e.g.
Hit update to save your changes.
Next you'll want to create categories. A category consists of a unique identifier and a file pattern with the shortcut ”[LANG]” within the name, which will be replaced with the language abbreviations. Later on, the system checks if imported files really belong to a category by matching the file to the pattern.
When you create your first category the admin page offers a new fieldset with an upload form. There you can choose a category, as well as insert the version you want to create (this version is only needed for a Master Language) and upload the files.
Hint: If you have a modern browser supporting HTML5 (e.g Safari 4+ or the latest Chrome editions), you can select multiple files to be imported at once.
The Export Manager offers all categories and available languages of the system. Hitting the export button downloads a language file where the filename is matches the category pattern.
The following syntax code has to be inserted into the page that you want to have the public translator. It will display the status of the current translations and the translation matrix for users who are logged in and have the right to edit a translation.