Restore corrupt .po language file

I had a problem with a .po file where all the data had disappeared. Lucky for me I still had a perfectly good .mo file. Having PoEdit installed on my systems(OSX/Linux) it is easy to decompile de .mo file and end up with a working .po file. To convert .mo files into .po files, just cd to the bin directory of your PoEdit install (in windows you have to use the command prompt) and use the following command:

msgunfmt [path_to_file.mo] > [path_to_file.po]

After that you should be able to open and edit the .po file in PoEdit. Happy translating.

NOTE: On OSX 10.5 and up PoEdit has been a little buggy, so I would suggest doing this in Linux or Windows.

UPDATE: In Windows command line you have to navigate to the /bin directory in the PoEdit directory before you can run the msgunfmt command!

Reageren

Jouw e-mail adres wordt niet gepubliceerd.

Ik heb het privacy beleid gelezen en ga akkoord.