Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

So I'm trying to figure out how .po and .pot files work, seeing as this is what Wordpress seems to use. But I can't wrap my head around it.

I get that a .pot file is a template file that indicates what .po files need to have translations for. What I don't get it how you're supposed to add entries to these files?

I can find references on how to do it through the CLI but none of the GUI apps I've tried seem to support this. Is it common for the developer to just use the CLI to create these .pot files and then translators just provide the .po files?

Am I missing something? Are there no tools used that take care of the whole process?

It all looks good in theory but atm the whole process of managing translations just seems ridiculous, I'd expect an industry standard these days to be a bit more polished and user friendly.

I should note, I don't have any problem understanding how to work it myself.. I'm just trying to figure out how everyone does this with non-programmers in their team. I can't possibly ask them to open up their terminal and execute a bash command.

share|improve this question

migrated from programmers.stackexchange.com Jan 11 '12 at 13:23

This question came from our site for professional programmers interested in conceptual questions about software development.

    
Thanks Glenn, I did not know this. –  Naatan Oct 25 '11 at 13:54
    
Not sure why this got migrated here; it has nothing directly to do with WordPress. –  Chip Bennett Jan 11 '12 at 19:50
    
@Chip it has even less to do with programmers :) I ok-ed migration. IMO there are plenty of specifics to WP i18n approach and workflow to make this on topic. –  Rarst Jan 12 '12 at 15:01
    
@Rarst just because a question mentions WordPress does not mean that it is in our defined scope. This question is entirely about how to create translation files, and the answer is entirely independent of WordPress. WPSE has a very specific, defined scope. Approving migration of questions that are completely outside of that scope hurts our site, rather than helping it. –  Chip Bennett Jan 12 '12 at 15:21
add comment

5 Answers 5

I can find references on how to do it through the CLI but none of the GUI apps I've tried seem to support this.

Did you see Poedit? Cross-platform GUI for preparing and producing gettext-translations (with some limitation compared to fresh CLI-tools)

Is it common for the developer to just use the CLI to create these .pot files and then translators just provide the .po files?

Yes, CLI have more flexibility in some areas and isn't too hard to use (after learning curve)

Am I missing something? Are there no tools used that take care of the whole process?

Just learn Poedit (while xgettext&Co is still better)

I'm just trying to figure out how everyone does this with non-programmers in their team

Translators have Poedit (which they know how to use) and get updated pots, return changed po back

share|improve this answer
add comment

http://poeditor.com/ is a web-based translation file editor that should meet your requirements. works with po, pot, xls, xlsx.

share|improve this answer
add comment

Take a look at Codestyling Localization plugin, that automates and provides interface for some of localization tasks right inside WP.

share|improve this answer
add comment

The Codex has a pretty detailed overview of this topic:

http://codex.wordpress.org/Translating_WordPress#Localization_Technology

share|improve this answer
add comment

Editing po files is easier than you can imagine. You can open a po file by any text editor such as gedit on linux or notepad on windows. After the header, you will see the following:

msgid "Something" msgstr "Translation of Something"

and the file goes on and on. If you want to change couple of translations, then , use gedit on linux or notepad on windows, open the file, and just change the text in quotes after msgstr. Then save the file.

The po file tehn has to be changed to binary format (mo) so that the server can understand it. This is done using one simple command

msgfmt source.po -o destination.mo

For this command to run successfully on Ubuntu, you have to have gettext installed by doing

sudo apt-get install gettext

After generating the destination.mo file, you can just copy it to your server with the same name as the old .mo file (replacing it) and you are ready to go

I am using Gtranslator on Ubuntu. It seems to be much easier and better than POedit. to install on ubuntu:

sudo apt-get install gtranslator
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.