Search code examples
bashmsgfmt

How to Compile .po file to .mo file , msgfmt not working


I have to compile a file .po to .mo with msgfmt, so I installed gettext (newest version) and do chmod 777 to my entire folder.

When I compile the file:

msgfmt /home/myuser/file.po -o /home/myuser/file.mo 

there are no errors, no life signal, nothing.

How can I solve it?


Solution

  • You have to change the order of your command:

    msgfmt /home/myuser/file.po -o /home/myuser/file.mo
    

    to:

    msgfmt -o /home/myuser/file.mo /home/myuser/file.po
    

    The usage of msgfmt can you get with:

    msgfmt --help