DokuWiki

It's better when it's simple

User Tools

Site Tools


localization

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
localization [2013-08-09 04:41]
ara
localization [2018-08-28 07:34] (current)
Samana Johann [Changing some localized texts and strings in your installation] ISO 639-1, right?
Line 1: Line 1:
-====== Localizing DokuWiki (the engine) ======+====== Localizing DokuWiki (the Software) ======
  
 [[DokuWiki]]'​s user interface can be configured to use any language by setting the appropriate option in the [[config:​lang|config]]. [[DokuWiki]]'​s user interface can be configured to use any language by setting the appropriate option in the [[config:​lang|config]].
  
-A list of available interface translations is available at the [[http://​translate.dokuwiki.org|DokuWiki Localization Hub]].+You can help translating DokuWiki to your language by visiting ​the [[http://​translate.dokuwiki.org|DokuWiki Localization Hub]]. We recommend to join the [[mailinglist#​I18N Mailing List]] to be informed when new strings are added and need to be translated.
  
-To translate ​DokuWiki ​to your own language, visit http://​translate.dokuwiki.org/,​ choose or add your language ​and use the web based translation editor to create a new or updated language pack.+===== Localizing ​DokuWiki and its plugins and templates =====
  
-Some easy to fix translation bugs are shown after running a few [[teams:​i18n:​translation-check|translation checks]].+Most of DokuWiki and its plugins and templates only provide localization for English and some other languages. 
 +We encourage you to translate them into your native language.
  
-If you did a translation ​or improved an existing one, just send it to <​andi@splitbrain.organd it will be included ​in the next release+Important things to keep in mind when translating:​ 
 +  * Please try to **complete your countries main official language** before starting another dialect. 
 +  * If you do major translation ​work it is recommended ​to check your translations in the [[http://​download.dokuwiki.org/​|development snapshot]]. This gives you the opportunity to correct errors and verify the layout in your language.  
 +  * In some languages words and sentences tend to get longer than the original English words. Keep in mind that **your translation needs to work on any screen size** ​and it often looks better if **words are in line with other items on the page**. 
 +  * When translating technical descriptions of external origin like the API's delivered by Github,​Twitter , Google etc please **read the external manual first**. This is especially important for translating interfaces. Maybe a localized version of the manual or helppages is already at the external source and you can use all or part of these.  
 +  * As DokuWiki wants to be **standards-compliant**,​ consider learning about these regarding your language first. You can learn about correct spelling and interpunction from dictionaries or webpages maintained by public institutions. ​  
 +  * Always **keep the format strings intact**, i.e. identical. Strings like these ''<​nowiki>​%1$d</​nowiki>''​ and ''​%%<​i>​%s</​i>​%%''​ and ''​%%<​strong>​Update:</​strong>​%%''​. The word ''​Update:''​ should be translated but the word ''​%%<​strong>​%%''​ **not**.
  
-Translators should join the [[mailinglist#​I18N Mailing List]] to be informed when new strings ​are added and need to be translated.+==== Directions for consistent translations ==== 
 +At the [[teams:​i18n:​consistenttranslations|consistent translations]] page you can find: 
 +  * some preferred translations for regularly used words  
 +  * and how to handle placeholder order in non-english ​strings.
  
-===== Localizing the plugins and templates =====+==== Plugins ​====
  
-Most of the plugins and templates only provide localizations for English and one other languageIf you would like to contribute missing localizations in any language, feel free to do it. It doesn'​t matter if you only would like translate ​a few sentences. Each tiny new strings will improve ​the plugin.+Plugin authors can register their plugin at the [[http://​translate.dokuwiki.org|DokuWiki Localization Hub]] where you can easily help to translate the plugin.
  
-The following short How-to describes how you can create the needed files and where to save them.+If a plugin is not translatable via the hub you can do it manually:
  
-  * Copy the content of ''​lib/​plugins/<​pluginname>/​lang/​en/''​ to\\ ''​lib/​plugins/<​pluginname>/​lang/<​ISO-code>/'' ​and translate the language in your wanted one. Similar for templates. +  * Copy the content of ''​lib/​plugins/<​pluginname>/​lang/​en/''​ to\\ ''​lib/​plugins/<​pluginname>/​lang/<​ISO-lang-code>/''​ 
-    You will find the ISO-code of well-known languages at http://​translate.dokuwiki.org/ +  Edit the contained ''​.php''​ and ''​.txt'' ​files in a [[utf-8|UTF-8 capable]] text editor 
-  * The are several ways to provide your translation ​files (sorted ​in favorite order) +  * Zip up the new language folder and send it to the author ​for inclusion in future releases
-    ​Push it via Github Pull Request to the Code Repository\\ (not available for every plugin) +
-    - Insert your translation content to the appropriate plugin page\\ (create a section "​Localization"​ if it's not there) +
-    - Contact ​the plugin ​author ​via mail\\ (Watch if there'​s any response. If not, please use another way to submit your translated content.) +
-    - Send an e-mail to the i18n Mailinglist+
  
 For any further questions or general help you could send a mail to the [[mailinglist#​i18n_mailing_list|I18N-Mailinglist]] or ask for help in the [[irc|IRC-Channel]]. For any further questions or general help you could send a mail to the [[mailinglist#​i18n_mailing_list|I18N-Mailinglist]] or ask for help in the [[irc|IRC-Channel]].
  
 +===== Changing some localized texts and strings in your installation =====
  
-===== Changing ​localized texts in your installation =====+There are many localized texts in DokuWiki like emails that are sent on registration,​ password forgotten, the text above the edit form, and more. Also the strings used in the buttons and links are translated. You can modify these by creating custom files with your version of the texts. This way your changes aren't overwritten on upgrades. ​
  
-Available since "​Rincewind RC1" 2011-04-22+You can change these texts by copying the ''<​name>​.txt''​ files or copying some strings from ''​lang.php'':​ 
 +  * from ''​inc/​lang/<​[[https://​www.loc.gov/​standards/​iso639-2/​php/​English_list.php|ISO 639-1]]-lang-code>/''​ 
 +  * to ''​**conf/​lang/​**<​ISO-lang-code>/''​ 
 +and editing the copied content. ​
  
-There are many localized texts in DokuWiki like emails that are sent on registration,​ password forgotten, ​the text above the edit form, ... +You can do the same thing for plugins and templates by copying ''<​name>​.txt''​ or some strings from ''​lang.php'':​ 
 +  * from ''​lib/​plugins/<​plugin>/​lang/<​ISO-lang-code>/''​ 
 +  * to ''​**conf/​plugin_lang/​**<​plugin>/<​ISO-lang-code>/''​
  
-You can change these texts by copying these files: +  ​* from ''​lib/​tpl/<​template>​/​lang/<​ISO-lang-code>/''​ 
-  ​* from ''​inc/​lang/<​ISO-code>/​<​name>​.txt''​\\ to ''​**conf/​lang/​**<​ISO-code>/​<​name>​.txt'' ​and editing the copied file. +  * to ''​**conf/​template_lang/**<​template>/​<ISO-lang-code>/''​
  
-This way your changes aren't overwritten on upgradesYou can do the same thing for plugins and templates(e.gthe help text for permissions in the ACL editor) by copying the files: +:!: Copy only strings from ''lang.php''​ which you will modify. The remains strings are read from the original file. 
-  * from ''​lib/​plugins/<​plugin>/​lang/<ISO-code>/<​name>​.txt''​\\ to ''​**conf/plugin_lang/**<​plugin>​/<ISO-code>​/<​name>​.txt'' ​ + 
-  from ''​lib/​tpl/<​template>​/lang/<​ISO-code>/<​name>​.txt''​\\ to ''​**conf/​template_lang/​**<template>​/<ISO-code>/<​name>​.txt''​ +Translating txt-files is possible since "​Rincewind"​ 2011-04-22Translating some strings ​from ''​lang.php''​ since Release 2014-09-29 "​Hrun"​. 
-and changing them there.+ 
 +===Example=== 
 +Example of an English ​''​lang.php'' ​file. This is possible for every language. 
 +<code php conf/lang/en/lang.php>​ 
 +<?php 
 +/** 
 + * Customization of the english language file 
 + * Copy only the strings that needs to be modified 
 + */ 
 + 
 +$lang['btn_admin']             ​= ​'Admin Panel'
 + 
 +</​code>​
  
-:!: This method cannot be used for ''​lang.php''​. If you need to change any text there you are recommended to add a "​new"​ language folder and copy the files from language of your choice. 
  
 ====== Translating DokuWiki.org (the documentation) ====== ====== Translating DokuWiki.org (the documentation) ======
  
-Translating the DokuWiki documentation here at dokuwiki.org is encouraged. Translated pages are to be named like their English counterparts and stored in a separate namespace based on their ISO code. To make this easier the [[plugin:​translation| translation plugin]] adds links to existing and missing translations in the upper right corner of every page.+Translating the DokuWiki documentation here at dokuwiki.org is encouraged. Translated pages are to be named like their English counterparts and stored in a separate namespace based on their ISO code. To make this easier the [[plugin:​translation| translation plugin]] adds links to existing and missing translations in the upper left corner of every page.
  
 Only languages manually configured by the administrator are shown in the selector. If you want to add translations for a language currently not shown, just manually create the pages in the appropriate language subnamespace and send a mail to the [[mailinglist#​i18n_mailing_list|I18N mailing list]] asking for your language to be added. ​ Only languages manually configured by the administrator are shown in the selector. If you want to add translations for a language currently not shown, just manually create the pages in the appropriate language subnamespace and send a mail to the [[mailinglist#​i18n_mailing_list|I18N mailing list]] asking for your language to be added. ​
Line 72: Line 95:
   * [[plugin:​translation|Translation Plugin]]   * [[plugin:​translation|Translation Plugin]]
   * [[devel:​localization|Development info about localization]]   * [[devel:​localization|Development info about localization]]
 +  * Directions for [[teams:​i18n:​consistenttranslations|consistent translations]]
 +  * The [[teams:​I18N]] Team (translation team)
localization.1376016084.txt.gz · Last modified: 2013-08-09 04:41 by ara