I'm using PHP to make .mo files out of the database and have run into a strange problem: some keys work, some don't. I think there is some kind of a problem with the generated files. How can I check, whether a .mo file is correct?
Asked
Active
Viewed 2,739 times
2 Answers
14
Use msgunfmt
, which is the opposite of msgfmt
:
msgunfmt something.mo
If the .mo
file is messed up, msgunfmt
will complain.

Peter Eisentraut
- 35,221
- 12
- 85
- 90
-
1This worked great. If on MacOS, and using Homebrew. You can do `brew install gettext` and then `brew link get text` and then have access to this command. – artlung Jun 27 '19 at 17:12
0
polib can open and read .mo files; it should not be difficult to create a small tool that iterates through the entries, allowing you to verify them.

Ignacio Vazquez-Abrams
- 776,304
- 153
- 1,341
- 1,358