How to create a header for gettext.po files?

I found most of the .po file structure in the GNU Gettext manual . But the manual says nothing about how to set the title.

How to create a header for gettext .po files?

thanks

+4
source share
2 answers

If I were you, I would just download the sample .po file and look inside with a regular text editor. The header contains the following information:

 # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE 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< me@mydomain.com >\n" "Language-Team: TEAM < team@TTEAM.com >\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" 

Then inside it is organized like this:

 # 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 a comment #: src/main/my/source/reference/:34 msgid "Get started now!" msgstr "Commencez dรจs maintenant!" 

Hope this helps ...

+7
source

Found a way to set the encoding as simple as putting "Content-Type: text/plain; charset=utf8" into the file.

+3
source

All Articles