PyDocs

Nav

Internationalization

translation

gettext

function (source)
  • translation(domain, localedir=None, languages=None, class_=None, fallback=False)
Return a *Translations instance based on the domain, localedir, and languages, which are first passed to find() to get a list of the associated .mo file paths. Instances with identical .mo file names are cached. The actual class instantiated is class_ if provided, otherwise GNUTranslations. The class’s constructor must take a single file object argument.
Changed in 3.3, 3.11
  • 3.3: IOError used to be raised, it is now an alias of OSError.
  • 3.11: codeset parameter is removed.
0 Examples
No examples for gettext/translation.
See Also
No see-alsos for gettext/translation
0 Notes
No notes for translation