What is the difference in the file content of a .po and a .pot file?
I would like to have the following process flow:
- The programmer marks some entries in the source code as translatable
- The programmer generates a template file (.pot if I understood it correctly)
- The translator uses the template file to translate the strings. He never has to get any part of the code.
If a new string is added or an old string gets updated, a new template is generated and the translator can "update" his old translation. He should only need to review / translate the changed / new strings. The programmer should not have to do this updating-work.
At the moment I use poEdit and its updating function. I guess this entry in the .po-file gives poEdit the needed information:
"X-Poedit-Basepath: /var/www/community-chess\n"
But this makes it necessary to have to complete, latest source code. This means, the programmer has to do the first step of up开发者_JAVA百科dating.
If I understood it correct, .pot-files are templates for .po-files. Is this just an empty (hence with no translated strings) .po-file? How can I create a .pot-file for a PHP-project on a Linux machine?
Once you have i18n'd your source, you can run xgettext
against it in order to extract all translatable strings into a .pot file.
精彩评论