Module mo
source code
Module for parsing Gettext .mo files for translation.
The coding of .mo files was produced from Gettext documentation, Pythons msgfmt.py and by
observing and testing existing .mo files in the wild.
The hash algorithm is implemented for MO files, this should result in
faster access of the MO file. The hash is optional for Gettext and is
not needed for reading or writing MO files, in this implementation it is
always on and does produce sometimes different results to Gettext in very
small files.
|
mounit
A class representing a .mo translation message.
|
|
mofile
A class representing a .mo file.
|
|
mounpack(filename='messages.mo')
Helper to unpack Gettext MO files into a Python string |
source code
|
|
|
|
|
|
|
|
|
MO_MAGIC_NUMBER = 0x950412deL
|
Imports:
base,
po,
poheader,
multistring,
struct,
array,
re