我在GNU Gettext manual中找到了.po文件的大部分结构。但是该手册没有说明如何设置标题。
如何为gettext
.po文件创建标题?
谢谢
最佳答案
如果您是我,我将下载一个示例.po文件,并使用常规文本编辑器进行内部查看。
header 包含以下信息:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#: src/link/to/my/src:67
msgid ""
msgstr ""
"Project-Id-Version: xxx\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-07-06 12:31-0500\n"
"PO-Revision-Date: 2011-05-27 22:37+0100\n"
"Last-Translator: My NAME<[email protected]>\n"
"Language-Team: TEAM <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
然后,内部是这样组织的:
# This is a comment
# and another line of comment
msgid "This is my original string to translate"
msgstr "Translation goes here ... "
# TRANSLATED : Mon Jun 14 09:36:07 2010
# TRANSLATOR : MyName goes here... it's a comment
#: src/main/my/source/reference/:34
msgid "Get started now!"
msgstr "Commencez dès maintenant!"
希望这可以帮助...
关于localization - 如何为gettext .po文件创建标题?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2066051/