Localizing docstrings
Martin v. Löwis
martin at v.loewis.de
Sun Dec 8 14:42:28 EST 2002
> Docstrings are supposedly "the" way to document python modules. How do
> you best go about providing that kind of documentation in multiple
> (human) languages? So, e.g, describe how a module works in both german
> and english.
I recommend you use the gettext module. Extract all doc strings into a
PO file, then have translators translate the PO file. Eventually, use
gettext to translate the doc string at run-time. See
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/python/nondist/i18
n/
for a somewhat outdated approach to do so for Python proper.
Regards,
Martin
More information about the Python-list
mailing list