Skip to content

pulp_glue.common.i18n

pulp_glue.common.i18n

get_translation(name) cached

Return a translations object for a certain import path.

Parameters:

  • name (str) –

    An import path.

Returns:

  • NullTranslations

    A gettext translations object containing all the gettext variations.

Examples:

Import the usual suspects like this:

from pulp_glue.common.i18n import get_translation

translation = get_translation(__package__)
_ = translation.gettext