开发者

What is the difference in the file content of a .po and a .pot file?

开发者 https://www.devze.com 2023-04-11 07:09 出处:网络
I would like to have the following process flow: The programmer marks some entries in the source code as translatable

I would like to have the following process flow:

  1. The programmer marks some entries in the source code as translatable
  2. The programmer generates a template file (.pot if I understood it correctly)
  3. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号