On this page
gettext.bindtextdomain
Up: gettext | Next: gettext.Catalog
Rel: gettext.Catalog, gettext.dgettext, gettext.dngettext, gettext.dnpgettext
Ref: docs.python.org — gettext.bindtextdomain
Tags: #public #python3 #stdlib #gettext
Import
import gettext
from gettext import bindtextdomain
Signature & Overview
gettext.bindtextdomain(domain, localedir=None)
gettext.bindtextdomain() function.
Usage
import gettext
d = gettext.bindtextdomain("myapp")
assert isinstance(d, str)
Gotchas
- Global domain-to-directory mapping: For per-request localization, prefer
gettext.translation(..., localedir=...).
REPL Inspect
from gettext import bindtextdomain
help(bindtextdomain)
Linked from
- tuts/python3/stdlib_module/gettext
- tuts/python3/stdlib_module/gettext/Catalog
- tuts/python3/stdlib_module/gettext/dgettext
- tuts/python3/stdlib_module/gettext/dngettext
- tuts/python3/stdlib_module/gettext/dnpgettext
- tuts/python3/stdlib_module/gettext/dpgettext
- tuts/python3/stdlib_module/gettext/find
- tuts/python3/stdlib_module/gettext/gettext
- tuts/python3/stdlib_module/gettext/GNUTranslations
- tuts/python3/stdlib_module/gettext/install
- tuts/python3/stdlib_module/gettext/ngettext
- tuts/python3/stdlib_module/gettext/npgettext
- tuts/python3/stdlib_module/gettext/NullTranslations
- tuts/python3/stdlib_module/gettext/pgettext
- tuts/python3/stdlib_module/gettext/textdomain
- tuts/python3/stdlib_module/gettext/translation
Related notes
- tuts/python3/stdlib_module/gettext/Catalog Linked here; links to this page; shared tags: #gettext, #stdlib
- tuts/python3/stdlib_module/gettext/dgettext Linked here; links to this page; shared tags: #gettext, #stdlib
- tuts/python3/stdlib_module/gettext/dngettext Linked here; links to this page; shared tags: #gettext, #stdlib
- tuts/python3/stdlib_module/gettext/dnpgettext Linked here; links to this page; shared tags: #gettext, #stdlib
- tuts/python3/stdlib_module/gettext/gettext Linked here; links to this page; shared tags: #gettext, #stdlib
- tuts/python3/stdlib_module/gettext/dpgettext links to this page; shared tags: #gettext, #stdlib
- tuts/python3/stdlib_module/gettext/find links to this page; shared tags: #gettext, #stdlib
- tuts/python3/stdlib_module/gettext/GNUTranslations links to this page; shared tags: #gettext, #stdlib
- tuts/python3/stdlib_module/gettext/install links to this page; shared tags: #gettext, #stdlib
- tuts/python3/stdlib_module/gettext/ngettext links to this page; shared tags: #gettext, #stdlib