WordPress: Installing WordPress in Your Language:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: Although WordPress displays in U.S. English by default, the software has the built-in capability to be used in any language. The WordPress community has already translated WordPress into ...)
 
无编辑摘要
 
(未显示同一用户的10个中间版本)
第1行: 第1行:
Although WordPress displays in U.S. English by default, the software has the built-in capability to be used in any language. The WordPress community has already translated WordPress into many languages, and there are Themes, translation files, and support available in many other languages (see [[WordPress in Your Language]]).  
虽然在默认情况下,WordPress是以美国英语的形式显示的,但是软件有其内置的功能使其能在任何语言中使用.WordPress团体已经将WordPress翻译成许多种语言,有许多种语言的主题,翻译文件和支持([[WordPress:Installing WordPress in Your Language|以你的语言安装WordPress]])  
安装一个WordPress的国际版本,你有两种选择.
# 在[[WordPress:WordPress in Your Language|以你的语言]]出现的WordPress中,遵循所列的为你的语言提供的说明
# 如果没有特别的介绍说明,遵从以下的说明来手动为你的WordPress站点安装一个语言文件


To install an international version of WordPress, you have two choices.  
==手动安装语言文件==
下面是你安装国际版本的WordPress时,你需要遵从的步骤
* 为你的语言下载<tt>.mo</tt> 语言文件(看[[WordPress:WordPress in Your Language|以你的语言出现]]WordPress得到更多的关于怎样找一个语言文件的线索.) .mo文件的命名惯例是以ISO-639语言代码,(例如,pt代表葡萄牙语)和其次的ISO-3116国家代码(例如_PT代表葡萄牙,或者_RE代表巴西)为基础的. 因此,西班牙葡萄牙语文件就称为pt_BR.mo, 非特别的葡萄牙语文件就称为pt.mo. 代码的全部列表可以在([http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#SEC222 (country codes)])和([http://www.gnu.org/software/gettext/manual/html_chapter/gettext_15.html#SEC221 (language codes)].)中找到.
* 在一个[[WordPress:Glossary#Text_editor|文本编辑器]]中打开你的wp-config.php文件并搜索:<pre>定义(“WPLANG”);</pre>
* 根据你刚刚下载的.mo文件来编辑这一行,例如,关于在巴西说的葡萄牙语,你必须加上:<pre>定义 (“WPLANG”, “pt_BR”);</pre>
* 保存文件.
* 在你的站点服务器上,在你的<tt>/wp-content</tt>或者/<tt>/wp-includes</tt>的<tt>/语言</tt>目录上创建一个新的文件夹
* 将.mo文件上传到你刚刚创建的语言文件夹中.
* 将改进的<tt>wp-config.php</tt> 文件上载到WordPress根目录中.
* 打开你的浏览器去你的WordPress站点. 现在WordPress应该以你新安装的语言出现.
* 如果你想定制你界面上显示的翻译,或者增加在安装后仍然以英语出现的一些术语的翻译,你要下载与你安装的.mo语言文件相对的<tt>.po</tt>文件.然后你要翻译额外的术语,并且创建一个新的<tt>.mo</tt>文件-更多信息请看翻译WordPress
* 你也许要翻译几个其它的文件-更多信息请看[[WordPress:直接翻译的文件]]


# Follow the instructions provided for your language listed at [[WordPress in Your Language]]
注意:如果上述步骤中出现了一个错误,或者你没有指定一个正确的语言,WordPress会默认回英语.关于安装WordPress更多的帮助,请看[[WordPress:Installing WordPress|安装WordPress]][[WordPress:FAQ Installation|安装常见问题解答]].
# If specific instructions are not available, follow the instructions below to manually install language files to your Wordpress site.
 
== Manually Installing Language Files ==
 
Here are the steps you will need to follow to install an international version of WordPress.
 
* Download the <tt>.mo</tt> language file for your language (see [[WordPress in Your Language]] for hints on how to find one). The naming convention of the <tt>.mo</tt> files is based on the ISO-639 language code (e.g. ''pt'' for Portuguese) followed by the ISO-3166 country code (e.g. ''_PT'' for Portugal or ''_BR'' for Brazil). So, the Brazilian Portuguese file would be called <tt>pt_BR.mo</tt>, and a non-specific Portuges file would be called <tt>pt.mo</tt>.  Complete lists of codes can be found at  [http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#SEC222 (country codes)]  and [http://www.gnu.org/software/gettext/manual/html_chapter/gettext_15.html#SEC221 (language codes)].
 
* Open your wp-config.php file in a [[Glossary#Text_editor|text editor]] and search for:
<pre>define ('WPLANG', '');</pre>
 
* Edit this line according to the <tt>.mo</tt> file you've just downloaded, e.g. for the Portuguese spoken in Brazil you must add:
<pre>define ('WPLANG', 'pt_BR');</pre>
 
* Save the file.
 
* On your site server, create a new folder in your <tt>/wp-content</tt> OR <tt>/wp-includes</tt> directory called <tt>/languages</tt>.
 
* Upload the .mo file to the <tt>languages</tt> folder you just created.
 
*  Upload the modified <tt>wp-config.php</tt> file into the WordPress root directory.
 
* Open your browser and go to your WordPress site. It should now display in the newly-installed language.
 
* If you want to customize the translations displayed on your screen, or add translations for terms that are still displaying in English after installation, you will need to download the <tt>.po</tt> file corresponding to the <tt>.mo</tt> language file you installed. Then you will need to translate additional terms and create a new <tt>.mo</tt> file -- see [[Translating WordPress]] for more information.
 
* You may also need to translate a few other files -- see [[Files For Direct Translation]] for more information.
 
'''Note:''' If there was an error in the steps above or you did not specify the correct language, WordPress will default back to English. For more help Installing WordPress, see [[Installing WordPress]] and [[FAQ Installation]].

2008年3月27日 (四) 11:51的最新版本

虽然在默认情况下,WordPress是以美国英语的形式显示的,但是软件有其内置的功能使其能在任何语言中使用.WordPress团体已经将WordPress翻译成许多种语言,有许多种语言的主题,翻译文件和支持(看 以你的语言安装WordPress)

安装一个WordPress的国际版本,你有两种选择.

  1. 以你的语言出现的WordPress中,遵循所列的为你的语言提供的说明
  2. 如果没有特别的介绍说明,遵从以下的说明来手动为你的WordPress站点安装一个语言文件

手动安装语言文件[ ]

下面是你安装国际版本的WordPress时,你需要遵从的步骤

  • 为你的语言下载.mo 语言文件(看以你的语言出现WordPress得到更多的关于怎样找一个语言文件的线索.) .mo文件的命名惯例是以ISO-639语言代码,(例如,pt代表葡萄牙语)和其次的ISO-3116国家代码(例如_PT代表葡萄牙,或者_RE代表巴西)为基础的. 因此,西班牙葡萄牙语文件就称为pt_BR.mo, 非特别的葡萄牙语文件就称为pt.mo. 代码的全部列表可以在((country codes))和((language codes).)中找到.
  • 在一个文本编辑器中打开你的wp-config.php文件并搜索:
    定义(“WPLANG”);
  • 根据你刚刚下载的.mo文件来编辑这一行,例如,关于在巴西说的葡萄牙语,你必须加上:
    定义 (“WPLANG”, “pt_BR”);
  • 保存文件.
  • 在你的站点服务器上,在你的/wp-content或者//wp-includes/语言目录上创建一个新的文件夹
  • 将.mo文件上传到你刚刚创建的语言文件夹中.
  • 将改进的wp-config.php 文件上载到WordPress根目录中.
  • 打开你的浏览器去你的WordPress站点. 现在WordPress应该以你新安装的语言出现.
  • 如果你想定制你界面上显示的翻译,或者增加在安装后仍然以英语出现的一些术语的翻译,你要下载与你安装的.mo语言文件相对的.po文件.然后你要翻译额外的术语,并且创建一个新的.mo文件-更多信息请看翻译WordPress
  • 你也许要翻译几个其它的文件-更多信息请看WordPress:直接翻译的文件

注意:如果上述步骤中出现了一个错误,或者你没有指定一个正确的语言,WordPress会默认回英语.关于安装WordPress更多的帮助,请看安装WordPress安装常见问题解答.