WordPress: Files For Direct Translation:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: == Introduction == Although WordPress displays in U.S. English by default, the software has the built-in capability to be used in any language, or 'localized' (see [[WordPress:WordPress ...)
 
无编辑摘要
 
第1行: 第1行:
== Introduction ==
== Introduction ==
== 介绍==


Although WordPress displays in U.S. English by default, the software has the built-in capability to be used in any language, or 'localized' (see [[WordPress:WordPress in Your Language]] for more information). The main capability for localization in WordPress uses the Gnu gettext system (see [[WordPress:Translating WordPress]] for more information). In the gettext system, text messages produced by WordPress's PHP files are run through a look-up function, which finds and uses the non-English equivalent of the default English word or phrase in a file. This works well for most of WordPress; however, there are a few components of WordPress that do not lend themselves to localization with gettext. This article explains why that is the case, and also shows how to localize those components of WordPress.
Although WordPress displays in U.S. English by default, the software has the built-in capability to be used in any language, or 'localized' (see [[WordPress:WordPress in Your Language]] for more information). The main capability for localization in WordPress uses the Gnu gettext system (see [[WordPress:Translating WordPress]] for more information). In the gettext system, text messages produced by WordPress's PHP files are run through a look-up function, which finds and uses the non-English equivalent of the default English word or phrase in a file. This works well for most of WordPress; however, there are a few components of WordPress that do not lend themselves to localization with gettext. This article explains why that is the case, and also shows how to localize those components of WordPress.
虽然WordPress默认情况下,显示为美式英语,WordPress本质上能在任何语言中使用,或者'本地化'(更多的信息,请看看[[WordPress:WordPress in Your Language|英语外其它语言的WordPress]])。WordPress主要使用Gnu gettext系统实现本地化(更多的信息,请看看[[WordPress:Translating WordPress|翻译WordPress]])。在gettext系统中,WordPress PHP文件产生的文本信息在look-up函数中运行,这个函数使用文件中默认英语单词和词组的非英语对等翻译。对于WordPress的大部分内容,gettext能够很好的操作翻译内容,但是WordPress中的少数内容不能够使用gettext翻译。这篇文章解释了这些内容为什么不能够使用gettext翻译以及怎样将WordPress的这些部分本地化。


== Where gettext Doesn't Work ==
== Where gettext Doesn't Work ==
== gettext不能够操作的内容==


There are several components of WordPress that cannot or should not be translated or localized with gettext:
There are several components of WordPress that cannot or should not be translated or localized with gettext:
WordPress中有几个部分,不能够由gettext翻译或者本地化:
* The main WordPress README file -- it's a static HTML file, not a PHP file, so it cannot be run through the gettext functions.
* The main WordPress README file -- it's a static HTML file, not a PHP file, so it cannot be run through the gettext functions.
*WordPress主要的自述文件—这是个静态的HTML文件,而不是个PHP文件,因此不能够在gettext函数中运行。
* A few error messages are generated very early in the WordPress loading cycle, before gettext is loaded.
* A few error messages are generated very early in the WordPress loading cycle, before gettext is loaded.
*在WordPress载入时,gettext还没有载入的时候,产生了一些错误信息。
* WordPress includes some JavaScript functionality, which runs on the users' browser (unlike PHP, which runs on the web server), and therefore does not have gettext available.
* WordPress includes some JavaScript functionality, which runs on the users' browser (unlike PHP, which runs on the web server), and therefore does not have gettext available.
*WordPress包含了一些JavaScript函数,这些函数在用户的浏览器上运行(与PHP不同,PHP在网络服务器上运行),因此没有gettext。


== Internationalizing Non-gettext Components ==
== Internationalizing Non-gettext Components ==
== 将非gettext的组成部分国际化==


In order to internationalize or localize components of WordPress that cannot use gettext, you will need to replace the English version of the files with a modified version, where the English text has been replaced by text in your language.  A list of the files you will need to translate is below.
In order to internationalize or localize components of WordPress that cannot use gettext, you will need to replace the English version of the files with a modified version, where the English text has been replaced by text in your language.  A list of the files you will need to translate is below.
为了将WordPress中不能够使用gettext的部分国际化或者本地化,你需要使用已更改的版本替换英语版本,在以更改的版本,英语文本已经替换为你的母语文本。你需要翻译的文件如下:


One note: if you are planning to release your localized files for use by others, be careful about WordPress versions! You will need to keep track of which version of WordPress they correspond to, or release different versions of the files for different versions of WordPress. You can find different versions of WordPress in the [http://wordpress.org/download/release-archive/ Release Archive], or if you want to get down to even more detail, the [http://trac.wordpress.org/browser/ Trac Browser] (a browser for the SVN source-code repository for WordPress).
One note: if you are planning to release your localized files for use by others, be careful about WordPress versions! You will need to keep track of which version of WordPress they correspond to, or release different versions of the files for different versions of WordPress. You can find different versions of WordPress in the [http://wordpress.org/download/release-archive/ Release Archive], or if you want to get down to even more detail, the [http://trac.wordpress.org/browser/ Trac Browser] (a browser for the SVN source-code repository for WordPress).
注意:如果你计划发行你的本地化文件供他人使用,注意是哪个版本的WordPress!你需要了解你翻译的WordPress对应的是哪个版本的WordPress,或者为不同版本的WordPress发行不同版本的文件。你可以在[http://wordpress.org/download/release-archive/ 版本归档]中找到不同版本的WordPress,如果你希望了解更加详细的信息,[http://trac.wordpress.org/browser/ Trac 浏览器](WordPress SVN源代码库浏览器)。


== List of Files to Translate ==  
== List of Files to Translate ==  
== 需要翻译的文件列表 ==


=== Core files (up to WP 2.5) ===
=== Core files (up to WP 2.5) ===
=== 核心文件 (直到WP 2.5) ===


* <tt>readme.html</tt> - it's a static HTML file, not a PHP file, so it cannot be run through the gettext functions. The whole file needs to be translated.
* <tt>readme.html</tt> - it's a static HTML file, not a PHP file, so it cannot be run through the gettext functions. The whole file needs to be translated.
* <tt>readme.html</tt> -这是个静态的HTML文件,而不是PHP文件,因此不能够在gettext函数中运行。整个文件都需要翻译。
* <tt>wp-blog-header.php</tt> - only the error for non-existent <tt>wp-config.php</tt> needs to be translated.
* <tt>wp-blog-header.php</tt> - only the error for non-existent <tt>wp-config.php</tt> needs to be translated.
* <tt>wp-blog-header.php</tt> -只有不存在的<tt>wp-config.php</tt>的错误,需要翻译。
* <tt>wp-settings.php</tt> - some <tt>die</tt> commands could happen before the gettext engine is loaded, so they need to be translated.
* <tt>wp-settings.php</tt> - some <tt>die</tt> commands could happen before the gettext engine is loaded, so they need to be translated.
* <tt>wp-settings.php</tt> - 载入gettext引擎之前,会出现一些命令,因此这些命令需要翻译。
* <tt>wp-config-sample.php</tt> - see below.
* <tt>wp-config-sample.php</tt> - see below.
* <tt>wp-config-sample.php</tt> -请看看下面的。
* <tt>wp-admin/install.php</tt> - only the error for non-existent <tt>wp-config.php</tt> needs to be translated.
* <tt>wp-admin/install.php</tt> - only the error for non-existent <tt>wp-config.php</tt> needs to be translated.
* <tt>wp-admin/install.php</tt> -只有不存在的<tt>wp-config.php</tt>的错误需要翻译。
* <tt>wp-admin/setup-config.php</tt> - this is a script for automatic generation of wp-config.php, and as it runs independent of WordPress, there is no gettext. The whole file needs to be translated.  
* <tt>wp-admin/setup-config.php</tt> - this is a script for automatic generation of wp-config.php, and as it runs independent of WordPress, there is no gettext. The whole file needs to be translated.  
*<tt>wp-admin/upgrade.php</tt> - only the warning message at the top of the file needs to be translated.
*<tt>wp-admin/upgrade.php</tt> - only the warning message at the top of the file needs to be translated.
* <tt>wp-admin/setup-config.php</tt> -这是自动产生wp-config.php的脚本,而且这个脚本独立于WordPress之外运行,没有gettext。整个文件都需要翻译。
*<tt>wp-admin/upgrade.php</tt> -只有文件顶上方出现的警示信息需要翻译。
*<tt>wp-includes/functions.php</tt> - there's a database error message at the end of the file that needs to be translated.
*<tt>wp-includes/functions.php</tt> - there's a database error message at the end of the file that needs to be translated.
*<tt>wp-includes/functions.php</tt> -文件的结尾部分出现有数据库错误信息,这个信息需要翻译。
*<tt>wp-includes/wp-db.php</tt> - database error messages need to be translated, because database loading happens early in WordPress loading.
*<tt>wp-includes/wp-db.php</tt> - database error messages need to be translated, because database loading happens early in WordPress loading.
*<tt>wp-includes/wp-db.php</tt> -需要翻译数据库错误信息,因为数据库载入发生在载入WordPress的早期。


=== Core files (WP 2.6) ===
=== Core files (WP 2.6) ===
=== 核心文件 (WP 2.6) ===
* <tt>readme.html</tt> - it's a static HTML file, not a PHP file, so it cannot be run through the gettext functions. The whole file needs to be translated.
* <tt>readme.html</tt> - it's a static HTML file, not a PHP file, so it cannot be run through the gettext functions. The whole file needs to be translated.
* <tt>readme.html</tt> -是个静态的HTML文件,而不是PHP文件,因此不能够在gettext函数上运行。整个文件需要翻译。
* <tt>wp-config-sample.php</tt> - see below.
* <tt>wp-config-sample.php</tt> - see below.
* <tt>wp-config-sample.php</tt> -请看看下面的。
* <tt>wp-admin/setup-config.php</tt> - this is a script for automatic generation of wp-config.php, and as it runs independent of WordPress, there is no gettext. The whole file needs to be translated.  
* <tt>wp-admin/setup-config.php</tt> - this is a script for automatic generation of wp-config.php, and as it runs independent of WordPress, there is no gettext. The whole file needs to be translated.  
* <tt>wp-admin/setup-config.php</tt> -这是自动创建wp-config.php的脚本,因为独立与WordPress之外运行,没有gettext。整个文件都需要翻译。
=== wp-config-sample.php ===


=== wp-config-sample.php ===
=== wp-config-sample.php ===
Translate the instructions in the PHP comments (so that someone who doesn't speak English can figure out how to configure WordPress), and set the WPLANG variable to the correct locale. For example change:<br/><tt>define ('WPLANG', <nowiki>''</nowiki>);</tt><br/>to<br/><tt>define ('WPLANG', 'bg_BG');</tt><br/>if you are using the <tt>bg_BG</tt> locale
Translate the instructions in the PHP comments (so that someone who doesn't speak English can figure out how to configure WordPress), and set the WPLANG variable to the correct locale. For example change:<br/><tt>define ('WPLANG', <nowiki>''</nowiki>);</tt><br/>to<br/><tt>define ('WPLANG', 'bg_BG');</tt><br/>if you are using the <tt>bg_BG</tt> locale
翻译PHP命令中的指示(这样不说英语的人,能够了解怎样配置WordPress),将WPLANG变数设置为正确的locale。例如更改:<br/><tt>define ('WPLANG', <nowiki>''</nowiki>);</tt><br/>to<br/><tt>定义 ('WPLANG', 'bg_BG');</tt><br/>如果你正使用 <tt>bg_BG</tt> locale。


Replace 'put your unique phrase here' with a similar phrase in your language. Then, in wp-content/languages/<your-locale>.php put:
Replace 'put your unique phrase here' with a similar phrase in your language. Then, in wp-content/languages/<your-locale>.php put:
将'在这里放上你的唯一的词组'更改为你的母语中对应的词组。然后,在wp-content/languages/<your-locale>.php中放入:
$wp_default_secret_key = '<the-translated-phrase>';


$wp_default_secret_key = '<the-translated-phrase>';
$wp_default_secret_key = '<the-translated-phrase>';


For example, here is what the Bulgarian files look like:
For example, here is what the Bulgarian files look like:
例如,这里是保加利亚语文件的样式:
dist/wp-config-sample.php:
<tt>
[...]<br />
define('AUTH_KEY', 'вашата супер-ултра-уникална фраза сложете тук');<br />
define('SECURE_AUTH_KEY', 'вашата супер-ултра-уникална фраза сложете тук');<br />
define('LOGGED_IN_KEY', 'вашата супер-ултра-уникална фраза сложете тук');<br />
[...]
</tt>
dist/wp-content/languages/bg_BG.php:
<tt>
<?php<br />
$wp_default_secret_key = 'вашата супер-ултра-уникална фраза сложете тук';<br />
?><br />
</tt>


dist/wp-config-sample.php:
dist/wp-config-sample.php:
第61行: 第154行:
?><br />
?><br />
</tt>
</tt>


=== TinyMCE files (up to WP 2.3 only) ===
=== TinyMCE files (up to WP 2.3 only) ===
=== TinyMCE 文件(只直到WP 2.3) ===


''Note: From WordPress 2.5 on there is no more need for direct translation of TinyMCE files, since their strings are contained within the main WordPress POT file.''
''Note: From WordPress 2.5 on there is no more need for direct translation of TinyMCE files, since their strings are contained within the main WordPress POT file.''
''注:从WordPress2.5开始,更需要直接翻译TinyMCE文件,因为这些字符串包含在WordPress主要的POT文件中。''


TinyMCE is the HTML editor included in WordPress. It is written in JavaScript, and therefore uses a different system for localization. To localize TinyMCE, you will need to do the following:
TinyMCE is the HTML editor included in WordPress. It is written in JavaScript, and therefore uses a different system for localization. To localize TinyMCE, you will need to do the following:
TinyMCE是WordPress中包含的HTML编辑器,使用JavaScript编写的,因此为本地化使用不同的系统。要本地化TinyMCE,你需要执行以下的操作:


* <tt>wp-includes/js/tinymce/langs/</tt> - create and add a file named  <tt>ll_cc.js</tt>, where <tt>ll</tt> is the lower-case language code for your locale, and <tt>cc</tt> is the lower-case country code. For example, the <tt>bg_BG</tt> locale files should be named <tt>bg_bg.js</tt>. This file should contain the translations of strings in <tt>en.js</tt> (text for buttons and descriptions).  
* <tt>wp-includes/js/tinymce/langs/</tt> - create and add a file named  <tt>ll_cc.js</tt>, where <tt>ll</tt> is the lower-case language code for your locale, and <tt>cc</tt> is the lower-case country code. For example, the <tt>bg_BG</tt> locale files should be named <tt>bg_bg.js</tt>. This file should contain the translations of strings in <tt>en.js</tt> (text for buttons and descriptions).  
* <tt>wp-includes/js/tinymce/langs/</tt> -创建并且添加名称为<tt>ll_cc.js</tt>的文件,<tt>ll</tt> 是你的locale的小写字母语言代码,<tt>cc</tt>是小写字母国家代码。例如,<tt>bg_BG</tt>本地化文件应该命名为<tt>bg_bg.js</tt>。这个文件应该在<tt>en.js</tt>中包含了字符串的翻译(按钮和描述的文本)。
* Several sub-directories of TinyMCE also have language directories, where you will need to do the same type of translation of their text:
* Several sub-directories of TinyMCE also have language directories, where you will need to do the same type of translation of their text:
*TinyMCE的几个子目录也有语言目录,你需要同样地翻译这些文本:
**<tt>wp-includes/js/tinymce/plugins/wphelp/langs/</tt>
**<tt>wp-includes/js/tinymce/plugins/wphelp/langs/</tt>
**<tt>wp-includes/js/tinymce/plugins/directionality/langs/</tt>
**<tt>wp-includes/js/tinymce/plugins/directionality/langs/</tt>
第78行: 第186行:
**<tt>wp-includes/js/tinymce/langs/</tt>
**<tt>wp-includes/js/tinymce/langs/</tt>
**<tt>wp-includes/js/tinymce/themes/advanced/langs/</tt>
**<tt>wp-includes/js/tinymce/themes/advanced/langs/</tt>
**<tt>wp-includes/js/tinymce/plugins/wphelp/langs/</tt>
**<tt>wp-includes/js/tinymce/plugins/directionality/langs/</tt>
**<tt>wp-includes/js/tinymce/plugins/spellchecker/langs/</tt>
**<tt>wp-includes/js/tinymce/plugins/autosave/langs/</tt>
**<tt>wp-includes/js/tinymce/plugins/wordpress/langs/</tt>
**<tt>wp-includes/js/tinymce/plugins/paste/langs/</tt>
**<tt>wp-includes/js/tinymce/langs/</tt>
**<tt>wp-includes/js/tinymce/themes/advanced/langs/</tt>
**Possibly others, if you have different TinyMCE plugins or themes -- search your TinyMCE directory structure for other <tt>langs</tt> directories.
**Possibly others, if you have different TinyMCE plugins or themes -- search your TinyMCE directory structure for other <tt>langs</tt> directories.
**也许还有其它的,如果你有不同的TinyMCE插件或者主题—为其它的<tt>langs</tt>目录,搜索你的TinyMCE目录结构。


=== Default theme ===
=== Default theme ===
===默认主题 ===


The Default WordPress theme is entirely in English. All of its files (contained in <tt>wp-content/theme/default</tt>) need to be translated. You may also want to provide other themes for your locale.
The Default WordPress theme is entirely in English. All of its files (contained in <tt>wp-content/theme/default</tt>) need to be translated. You may also want to provide other themes for your locale.
默认WordPress主题完全是用英语写的。所有这些文件(包含在<tt>wp-content/theme/default</tt>中)需要翻译。你可能也想为你的locale提供其它的主题。


Besides the English-only version of the default theme, a gettext one also exists. It can be found in the [http://svn.automattic.com/wordpress-i18n/theme/ theme folder of the wordpress-i18n svn repository].
Besides the English-only version of the default theme, a gettext one also exists. It can be found in the [http://svn.automattic.com/wordpress-i18n/theme/ theme folder of the wordpress-i18n svn repository].
除了英语版本的默认主题之外,还有个gettext版本的。可以在[http://svn.automattic.com/wordpress-i18n/theme/ wordpress-i18n svn 库主题文件夹]中找到。


=== Do not translate ===
=== Do not translate ===
=== 不要翻译 ===


*<tt>license.txt</tt> - Should be kept in place for legal reasons. A translated version can be added to the archive.
*<tt>license.txt</tt> - Should be kept in place for legal reasons. A translated version can be added to the archive.
*<tt>license.txt</tt> -因为合法性需要存在在WordPress中。可以将翻译的版本添加到归档上。

2008年9月12日 (五) 14:46的最新版本

Introduction[ ]

介绍[ ]

Although WordPress displays in U.S. English by default, the software has the built-in capability to be used in any language, or 'localized' (see WordPress:WordPress in Your Language for more information). The main capability for localization in WordPress uses the Gnu gettext system (see WordPress:Translating WordPress for more information). In the gettext system, text messages produced by WordPress's PHP files are run through a look-up function, which finds and uses the non-English equivalent of the default English word or phrase in a file. This works well for most of WordPress; however, there are a few components of WordPress that do not lend themselves to localization with gettext. This article explains why that is the case, and also shows how to localize those components of WordPress.

虽然WordPress默认情况下,显示为美式英语,WordPress本质上能在任何语言中使用,或者'本地化'(更多的信息,请看看英语外其它语言的WordPress)。WordPress主要使用Gnu gettext系统实现本地化(更多的信息,请看看翻译WordPress)。在gettext系统中,WordPress PHP文件产生的文本信息在look-up函数中运行,这个函数使用文件中默认英语单词和词组的非英语对等翻译。对于WordPress的大部分内容,gettext能够很好的操作翻译内容,但是WordPress中的少数内容不能够使用gettext翻译。这篇文章解释了这些内容为什么不能够使用gettext翻译以及怎样将WordPress的这些部分本地化。

Where gettext Doesn't Work[ ]

gettext不能够操作的内容[ ]

There are several components of WordPress that cannot or should not be translated or localized with gettext:

WordPress中有几个部分,不能够由gettext翻译或者本地化:

  • The main WordPress README file -- it's a static HTML file, not a PHP file, so it cannot be run through the gettext functions.
  • WordPress主要的自述文件—这是个静态的HTML文件,而不是个PHP文件,因此不能够在gettext函数中运行。
  • A few error messages are generated very early in the WordPress loading cycle, before gettext is loaded.
  • 在WordPress载入时,gettext还没有载入的时候,产生了一些错误信息。
  • WordPress includes some JavaScript functionality, which runs on the users' browser (unlike PHP, which runs on the web server), and therefore does not have gettext available.
  • WordPress包含了一些JavaScript函数,这些函数在用户的浏览器上运行(与PHP不同,PHP在网络服务器上运行),因此没有gettext。

Internationalizing Non-gettext Components[ ]

将非gettext的组成部分国际化[ ]

In order to internationalize or localize components of WordPress that cannot use gettext, you will need to replace the English version of the files with a modified version, where the English text has been replaced by text in your language. A list of the files you will need to translate is below.

为了将WordPress中不能够使用gettext的部分国际化或者本地化,你需要使用已更改的版本替换英语版本,在以更改的版本,英语文本已经替换为你的母语文本。你需要翻译的文件如下:

One note: if you are planning to release your localized files for use by others, be careful about WordPress versions! You will need to keep track of which version of WordPress they correspond to, or release different versions of the files for different versions of WordPress. You can find different versions of WordPress in the Release Archive, or if you want to get down to even more detail, the Trac Browser (a browser for the SVN source-code repository for WordPress).

注意:如果你计划发行你的本地化文件供他人使用,注意是哪个版本的WordPress!你需要了解你翻译的WordPress对应的是哪个版本的WordPress,或者为不同版本的WordPress发行不同版本的文件。你可以在版本归档中找到不同版本的WordPress,如果你希望了解更加详细的信息,Trac 浏览器(WordPress SVN源代码库浏览器)。

List of Files to Translate[ ]

需要翻译的文件列表[ ]

Core files (up to WP 2.5)[ ]

核心文件 (直到WP 2.5)[ ]

  • readme.html - it's a static HTML file, not a PHP file, so it cannot be run through the gettext functions. The whole file needs to be translated.
  • readme.html -这是个静态的HTML文件,而不是PHP文件,因此不能够在gettext函数中运行。整个文件都需要翻译。
  • wp-blog-header.php - only the error for non-existent wp-config.php needs to be translated.
  • wp-blog-header.php -只有不存在的wp-config.php的错误,需要翻译。
  • wp-settings.php - some die commands could happen before the gettext engine is loaded, so they need to be translated.
  • wp-settings.php - 载入gettext引擎之前,会出现一些命令,因此这些命令需要翻译。
  • wp-config-sample.php - see below.
  • wp-config-sample.php -请看看下面的。
  • wp-admin/install.php - only the error for non-existent wp-config.php needs to be translated.
  • wp-admin/install.php -只有不存在的wp-config.php的错误需要翻译。
  • wp-admin/setup-config.php - this is a script for automatic generation of wp-config.php, and as it runs independent of WordPress, there is no gettext. The whole file needs to be translated.
  • wp-admin/upgrade.php - only the warning message at the top of the file needs to be translated.
  • wp-admin/setup-config.php -这是自动产生wp-config.php的脚本,而且这个脚本独立于WordPress之外运行,没有gettext。整个文件都需要翻译。
  • wp-admin/upgrade.php -只有文件顶上方出现的警示信息需要翻译。
  • wp-includes/functions.php - there's a database error message at the end of the file that needs to be translated.


  • wp-includes/functions.php -文件的结尾部分出现有数据库错误信息,这个信息需要翻译。
  • wp-includes/wp-db.php - database error messages need to be translated, because database loading happens early in WordPress loading.
  • wp-includes/wp-db.php -需要翻译数据库错误信息,因为数据库载入发生在载入WordPress的早期。

Core files (WP 2.6)[ ]

核心文件 (WP 2.6)[ ]

  • readme.html - it's a static HTML file, not a PHP file, so it cannot be run through the gettext functions. The whole file needs to be translated.
  • readme.html -是个静态的HTML文件,而不是PHP文件,因此不能够在gettext函数上运行。整个文件需要翻译。
  • wp-config-sample.php - see below.
  • wp-config-sample.php -请看看下面的。
  • wp-admin/setup-config.php - this is a script for automatic generation of wp-config.php, and as it runs independent of WordPress, there is no gettext. The whole file needs to be translated.
  • wp-admin/setup-config.php -这是自动创建wp-config.php的脚本,因为独立与WordPress之外运行,没有gettext。整个文件都需要翻译。

wp-config-sample.php[ ]

wp-config-sample.php[ ]

Translate the instructions in the PHP comments (so that someone who doesn't speak English can figure out how to configure WordPress), and set the WPLANG variable to the correct locale. For example change:
define ('WPLANG', '');
to
define ('WPLANG', 'bg_BG');
if you are using the bg_BG locale

翻译PHP命令中的指示(这样不说英语的人,能够了解怎样配置WordPress),将WPLANG变数设置为正确的locale。例如更改:
define ('WPLANG', '');
to
定义 ('WPLANG', 'bg_BG');
如果你正使用 bg_BG locale。

Replace 'put your unique phrase here' with a similar phrase in your language. Then, in wp-content/languages/<your-locale>.php put:

将'在这里放上你的唯一的词组'更改为你的母语中对应的词组。然后,在wp-content/languages/<your-locale>.php中放入:

$wp_default_secret_key = '<the-translated-phrase>';

$wp_default_secret_key = '<the-translated-phrase>';

For example, here is what the Bulgarian files look like:

例如,这里是保加利亚语文件的样式:

dist/wp-config-sample.php:

[...]
define('AUTH_KEY', 'вашата супер-ултра-уникална фраза сложете тук');
define('SECURE_AUTH_KEY', 'вашата супер-ултра-уникална фраза сложете тук');
define('LOGGED_IN_KEY', 'вашата супер-ултра-уникална фраза сложете тук');
[...]

dist/wp-content/languages/bg_BG.php:

<?php
$wp_default_secret_key = 'вашата супер-ултра-уникална фраза сложете тук';
?>


dist/wp-config-sample.php:

[...]
define('AUTH_KEY', 'вашата супер-ултра-уникална фраза сложете тук');
define('SECURE_AUTH_KEY', 'вашата супер-ултра-уникална фраза сложете тук');
define('LOGGED_IN_KEY', 'вашата супер-ултра-уникална фраза сложете тук');
[...]

dist/wp-content/languages/bg_BG.php:

<?php
$wp_default_secret_key = 'вашата супер-ултра-уникална фраза сложете тук';
?>


TinyMCE files (up to WP 2.3 only)[ ]

TinyMCE 文件(只直到WP 2.3)[ ]

Note: From WordPress 2.5 on there is no more need for direct translation of TinyMCE files, since their strings are contained within the main WordPress POT file.

注:从WordPress2.5开始,更需要直接翻译TinyMCE文件,因为这些字符串包含在WordPress主要的POT文件中。


TinyMCE is the HTML editor included in WordPress. It is written in JavaScript, and therefore uses a different system for localization. To localize TinyMCE, you will need to do the following:

TinyMCE是WordPress中包含的HTML编辑器,使用JavaScript编写的,因此为本地化使用不同的系统。要本地化TinyMCE,你需要执行以下的操作:

  • wp-includes/js/tinymce/langs/ - create and add a file named ll_cc.js, where ll is the lower-case language code for your locale, and cc is the lower-case country code. For example, the bg_BG locale files should be named bg_bg.js. This file should contain the translations of strings in en.js (text for buttons and descriptions).


  • wp-includes/js/tinymce/langs/ -创建并且添加名称为ll_cc.js的文件,ll 是你的locale的小写字母语言代码,cc是小写字母国家代码。例如,bg_BG本地化文件应该命名为bg_bg.js。这个文件应该在en.js中包含了字符串的翻译(按钮和描述的文本)。
  • Several sub-directories of TinyMCE also have language directories, where you will need to do the same type of translation of their text:
  • TinyMCE的几个子目录也有语言目录,你需要同样地翻译这些文本:
    • wp-includes/js/tinymce/plugins/wphelp/langs/
    • wp-includes/js/tinymce/plugins/directionality/langs/
    • wp-includes/js/tinymce/plugins/spellchecker/langs/
    • wp-includes/js/tinymce/plugins/autosave/langs/
    • wp-includes/js/tinymce/plugins/wordpress/langs/
    • wp-includes/js/tinymce/plugins/paste/langs/
    • wp-includes/js/tinymce/langs/
    • wp-includes/js/tinymce/themes/advanced/langs/



    • wp-includes/js/tinymce/plugins/wphelp/langs/
    • wp-includes/js/tinymce/plugins/directionality/langs/
    • wp-includes/js/tinymce/plugins/spellchecker/langs/
    • wp-includes/js/tinymce/plugins/autosave/langs/
    • wp-includes/js/tinymce/plugins/wordpress/langs/
    • wp-includes/js/tinymce/plugins/paste/langs/
    • wp-includes/js/tinymce/langs/
    • wp-includes/js/tinymce/themes/advanced/langs/
    • Possibly others, if you have different TinyMCE plugins or themes -- search your TinyMCE directory structure for other langs directories.
    • 也许还有其它的,如果你有不同的TinyMCE插件或者主题—为其它的langs目录,搜索你的TinyMCE目录结构。

Default theme[ ]

默认主题[ ]

The Default WordPress theme is entirely in English. All of its files (contained in wp-content/theme/default) need to be translated. You may also want to provide other themes for your locale.

默认WordPress主题完全是用英语写的。所有这些文件(包含在wp-content/theme/default中)需要翻译。你可能也想为你的locale提供其它的主题。

Besides the English-only version of the default theme, a gettext one also exists. It can be found in the theme folder of the wordpress-i18n svn repository.

除了英语版本的默认主题之外,还有个gettext版本的。可以在wordpress-i18n svn 库主题文件夹中找到。

Do not translate[ ]

不要翻译[ ]

  • license.txt - Should be kept in place for legal reasons. A translated version can be added to the archive.
  • license.txt -因为合法性需要存在在WordPress中。可以将翻译的版本添加到归档上。