您可以访问 DokuWiki 本地化Hub 将 DokuWiki 翻译成自己使用的语言。我们推荐您参与 I18N 邮件列表,那么当有新词汇出现并且需要翻译时就会收到通知。
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.
Important things to keep in mind when translating:
%1$d
and <i>%s</i>
and <strong>Update:</strong>
. The word Update:
should be translated but the word <strong>
not.为了阻止垃圾信息,https://translate.dokuwiki.org/ 仅启用源代码中已经存在的语言。要启动新语言,您可以发送带有一些翻译行的拉取请求,或者,如果您不会编程,则可以在我们的错误追踪器中打开一个新话题。请使用 ISO 639-1 (2字符)和 ISO 639-3 (3字符)语言代码格式,然后……当语言被接受后,就可以使用翻译工具翻译了。
在翻译一致性页面您会看到:
插件作者会在 DokuWiki 本地化 Hub 注册插件,您就可以在那里帮助作者翻译插件了。
如果插件不能通过 DokuWiki 本地化 Hub 翻译,您可以手动进行:
lib/plugins/<pluginname>/lang/en/
内容到 lib/plugins/<pluginname>/lang/<ISO-lang-code>/
想要更多相关问题和帮助,您可以给 I18N-邮件列表发送邮件或者在 IRC-Channel 寻求帮助。
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.
You can change these texts by copying the <name>.txt
files or copying some strings from lang.php
:
inc/lang/<ISO 639-1-lang-code>/
conf/lang/<ISO-lang-code>/
and editing the copied content.
You can do the same thing for plugins and templates by copying <name>.txt
or some strings from lang.php
:
lib/plugins/<plugin>/lang/<ISO-lang-code>/
conf/plugin_lang/<plugin>/<ISO-lang-code>/
lib/tpl/<template>/lang/<ISO-lang-code>/
conf/template_lang/<template>/<ISO-lang-code>/
Copy only strings from lang.php
which you will modify. The remaining strings are read from the original file.
Translating txt-files is possible since „Rincewind” 2011-04-22. Translating some strings from lang.php
since Release 2014-09-29 „Hrun”.
Example of an English lang.php
file. This is possible for every language.
<?php /** * Customization of the english language file * Copy only the strings that needs to be modified */ $lang['btn_admin'] = 'Admin Panel';
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 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 I18N mailing list asking for your language to be added.
在页面插入宏命令 ~~NOTRANS~~
,则页面不可翻译。