This is the documentation for older versions of Odoo (formerly OpenERP).

See the new Odoo user documentation.

See the new Odoo technical documentation.

I18n - 国际化

关于多种语言应用程序的说明

简介

The I18n contains the translation of module in different languages. The folder contains two type of files .po and .pot. The .po files are the actual translation files where as .pot is the template for the translation.

.po 文件应该是依照对应语言的代码命名的, .pot 应该是依照对应模块的名称命名的。

以下以 account.pot 为例子

"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-05-19 14:36+0000\n"
"PO-Revision-Date: 2009-05-20 10:36+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-12-07 15:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"

#. module: account
#: code:addons/account/account.py:0
#, python-format
msgid "Integrity Error !"
msgstr ""

上述的文件是会计(account)模块翻译文件的模板,里面的程序是在判别所有模块里的值,在对应的语言里应该被翻译成什么。

以下例子是会计模块里的 fr_FR.po 把会计模块翻译成法文。

# Translation of OpenERP Server.
# This file contains the translation of the following modules:
#     * account
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-05-19 14:36+0000\n"
"PO-Revision-Date: 2010-01-04 11:19+0530\n"
"Last-Translator: Anup <ach@tinyerp.co.in>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-12-07 15:07+0000\n"
"X-Generator: Launchpad (build Unknown)\n"

#. module: account
#: code:addons/account/account.py:0
#, python-format
msgid "Integrity Error !"
msgstr "Erreur d'Intégrité !"

The above file translates the values of msgid to French in msgstr.Based on the msgid present in the .pot file. fr_FR is the language code for French language in which fr specifies the language and FR specifies the country in which the language is spoken.