36

Is there any way to convert a .mo file into a .po file source, when the .po file is no longer available? I need to edit the content of a .mo file but I don't have the .po file. Is it possible?

octopusgrabbus
  • 10,555
  • 15
  • 68
  • 131
morteza
  • 361
  • 1
  • 3
  • 3

4 Answers4

52
msgunfmt [path_to_file.mo] > [path_to_file.po]
Octavian Vladu
  • 1,250
  • 13
  • 16
7

Under Windows and with recent Poedit 2.2.4 installed:

"C:\Program Files (x86)\Poedit\GettextTools\bin\msgunfmt.exe" file.mo -o file.po

To re-create the .mo file:

"C:\Program Files (x86)\Poedit\GettextTools\bin\msgfmt.exe" file_edited.po -o file_new.mo

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
hexaae
  • 135
  • 1
  • 5
6

You can solve this problem by using polib to decompile .mo files.

octopusgrabbus
  • 10,555
  • 15
  • 68
  • 131
Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
6

With installed poedit you can use:

START -> RUN (cmd)

/program files/poedit/bin/msgunfmt ab_AB.mo > ab_AB.po

Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
x y
  • 113
  • 1
  • 6