Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Need help syncing po file WordPress

  • SOLVED

Hi,

I am working on this theme here https://github.com/SeamlessThemes/Seamless and am almost done, but I have no idea how to sync the po file with the theme in the languages folder. I think it is kind of easy to do, but I just don't know how to do it. Could someone please download the zip of my theme and sync the po file for me (I think it is done automatically with POEdit, right? - everytime I try to do it with POEdit nothing happens :x)

Answers (4)

2013-02-27

Gabriel Reguly answers:

Hi Jagst3r21,

To be clear, you mean the po file is missing some of the strings which should be translated?

Regards,
Gabriel


Jagst3r21 comments:

Gabriel,

Yes, some of the strings are missing and some are not the same as they are in the actual php files. I am not sure how to do this without checking each file and updating. This would take hours. POEdit is supposed to do it automatically, but I cannot get it set up properly. Could you sync for me if you have experience with POEdit?


Gabriel Reguly comments:

Hi Jagst3r21,

Please find the file attached.

The name has .jpg, but in fact it is a .po :-)

Regards,
Gabriel




Gabriel Reguly comments:

Hi Jagst3r21,

Please find the file here: [[LINK href="https://www.dropbox.com/s/mqculr0ohneik81/seamless-en_EN.po"]]https://www.dropbox.com/s/mqculr0ohneik81/seamless-en_EN.po[[/LINK]]


Regards,
Gabriel




Gabriel Reguly comments:

Hi Jagst3r21,

BTW, I have used poedit's option <em>Catalog -> Update from sources
</em>

Regards,
Gabriel


2013-02-27

Francisco Javier Carazo Gil answers:

Hi,

You have to read it: http://codex.wordpress.org/Translating_WordPress


Francisco Javier Carazo Gil comments:

In your theme files you have to use these two files:
__('message')
Searches the localization module for the translation of 'message', and passes the translation to the PHP return statement. If no translation is found for 'message', it just returns 'message'.
_e('message')
Searches the localization module for the translation of 'message', and passes the translation to the PHP echo statement. If no translation is found for 'message', it just echoes 'message'.


Francisco Javier Carazo Gil comments:

With Poedit, you have to create .mo files, they are created from a .po file when you are working with it. Save and .mo will be created.


Francisco Javier Carazo Gil comments:

In wp-config.php you have to set your language: define ('WPLANG', 'pt_BR');


Francisco Javier Carazo Gil comments:

And finally names:

The names of the .mo files are important. All .mo files will go to the theme’s folder and their names indicate which language they translate to. You can choose any name you like, but you should really follow the standard locale naming convention. Normally, it’s language_COUNTRY (each in two letters). For example, to provide the German (Germany) translation, you’ll name it de_DE.mo.

2013-02-27

Abdelhadi Touil answers:

Hi.
Here is a great video explaining how to translate a wordpress theme (in fact it's a tutorial from a great serie). It's the second video:

[[LINK href="http://wp.tutsplus.com/tutorials/theme-development/adaptive-blog-theme-localization-and-polishing/"]]http://wp.tutsplus.com/tutorials/theme-development/adaptive-blog-theme-localization-and-polishing/[[/LINK]]

Good luck.

2013-03-02

Kathy answers:

What do you mean by "sync"? Do you mean you need to create a new .pot file for your theme? If so, then you can use the [[LINK href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Generating_a_POT_file"]]makepot.php script[[/LINK]] provided in the WordPress Codex. It can be a little tricky to set up, but here is a link to a decent tutorial: http://www.foxrunsoftware.net/articles/wordpress/translating-a-wordpress-plugin-step-by-step/

Once it is set up, it is a pretty easy thing to run the script and auto-generate a new .pot file. (Is more difficult to setup on Windows as php is not an environment variable).

I ran the script and attached the resulting .pot file.