Compile PO files to MO files

During the last days I stumbled upon a problem with my PO files which I got from Transifex – I had to compile them to get MO files for shipping with my WordPress plugin. Google pointed me to the msgfmt tool which I was able to use in my scripts:

msgfmt -o lang.mo lang.po

That’s one of the things I love about Linux: You got that many things already onboard to make your life easy.

5 Comments

  1. Thanks, usually I let poedit do this step but I’m missing the original pot file and I have to add new strings :(

  2. Wow I really needed this piece of code. old school work is better than POedit or any tools.

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.