Name

install

Synopsis

install(domain,localedir=None,unicode=False)

Installs in Python’s built-in namespace a function named _ that performs translations specified by file <lang>/LC_MESSAGES/<domain>.mo in directory localedir, with language code <lang> as per getdefaultlocale. When localedir is None, install uses directory os.path.join(sys.prefix,'share','locale'). When unicode is true, function _ accepts and returns Unicode strings rather than plain strings.

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.