pulp_glue.common.i18n¶
get_translation
cached
¶
get_translation(name: str) -> gettext.NullTranslations
Return a translations object for a certain import path.
Parameters: |
|
---|
Returns: |
|
---|
Examples:
Import the usual suspects like this:
from pulp_glue.common.i18n import get_translation
translation = get_translation(__package__)
_ = translation.gettext
Source code in pulp-glue/pulp_glue/common/i18n.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|