Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I check .mo file validity?

Tags:

php

gettext

po

mo

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?

like image 268
Fluffy Avatar asked Jun 16 '11 11:06

Fluffy


People also ask

How do I open a .MO file?

How can I open a MO file? You need a suitable software like Gettext to open a MO file. Without proper software you will receive a Windows message "How do you want to open this file?" or "Windows cannot open this file" or a similar Mac/iPhone/Android alert.

What is .MO extension?

Binary data file that contains object data referenced by a program; typically used to translate program code; may be loaded or imported into the GNU gettext program. Since MO files are binary in nature, they are not human readable like . PO files.


1 Answers

Use msgunfmt, which is the opposite of msgfmt:

msgunfmt something.mo

If the .mo file is messed up, msgunfmt will complain.

like image 187
Peter Eisentraut Avatar answered Nov 01 '22 01:11

Peter Eisentraut