How to get a .po file from .pot files

I am using cakePHP 2.0 and using a console tool to create one ... /app/locale/default.pot. Now I would like to translate my site into several languages. I read the paragraph on internationalization in the cook's book (http://book.cakephp.org/1.2/en/view/162/Internationalizing-Your-Application).

I am copying the default.pot files to

  • ... / application / locale / rus / LC_MESSAGES / default.pot
  • ... / app / locale / FRE / LC_MESSAGES / default.pot
  • ... / app / locale / POL / LC_MESSAGES / default.pot
  • ...

And enter the tranalations string using utf-8 text editor (like gedit). And ... my site is not translated at all.

I noticed that AppController can implement some code to change Configure :: write ('Config.language', some_three_letters_language), since the config didn't change anything, I implemented very simple code.

// in AppController
public function beforeFilter() {
        Configure::write('Config.language', 'fre');
}

      

Why does the translation function always return arguments and not the translated string in .pot files (in views, __ ('Something') -answers-> 'Something?)?

I have not found .pot files translated to .po anywhere. How can I get these .po files from REHL or CentOS (can't get a suitable package with po or poeditor in name)?

Thanks for your reply.

+3


source to share


1 answer


Files

.pot and .po are the same file format..pot stands for "PO template". The difference is that you have to use this template file and pass it on to your translators who will create the translated .po files. The .pot file is a template for several localized .po files. See http://www.gnu.org/software/gettext/manual/gettext.html#Files .



In other words, just renaming .pot to .po will do.
There is a tool msginit

in the correct gettext workflow that will also set the number of headers to the correct values ​​for the selected locale.

+8


source







All Articles