3 ms·
It's standard Python practice since Martin von Löwis's work in support for internationalization, which he presented at the IPC6 Python conference in 1997. Quot
by dalke 13y ago
It's standard Python practice since Martin von Löwis's work in support for internationalization, which he presented at the IPC6 Python conference in 1997.
Quoting from http://www.python.org/workshops/1997-10/proceedings/loewis.html http://www.python.org/workshops/1997-10/proceedings/loewis.h... :
> Here are several ways of producing the message catalogs. This is the one suggested by the GNU gettext documentation. First, all translatable message strings in the source code must be marked. In order to disturb readability as little as possible, the wrapper function around each string should be called _ (underscore). This use of the underscore usually does not interfere with its meaning in the interactive mode. A gettextized module would then begin with
import intl
_=intl.gettext