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.

Share

You may also like...

5 Responses

  1. wayn3 says:

    If you want to convert po files to mo files, you can use this online converter http://po2mo.net/

  2. Stargazer says:

    Nice idea, but honestly, I do prefer offline tools for such work. You never know what they do with your work…

  3. Giovanni Cappellini says:

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

  4. Amir says:

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

  5. Stargazer says:

    For me it’s just good old lazyness as I can update things on a box without using X11

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.