class_docstr: This extension adds gettext support to Jinja.
class_docstr_tok: ["This","extension","adds","gettext","support","to","Jinja","."]
code: def _install(
      self,
      translations: "_SupportedTranslations",
      newstyle: t.Optional[bool] = None,
  ) -> None:
      # ugettext and ungettext are preferred in case the I18N library
      # is providing compatibility with older Python versions.
      gettext = getattr(translations, "ugettext", None)
      if gettext is None:
          gettext = translations.gettext
      ngettext = getattr(translations, "ungettext", None)
      if ngettext is None:
          ngettext = translations.ngettext
  
      pgettext = getattr(translations, "pgettext", None)
      npgettext = getattr(translations, "npgettext", None)
      self._install_callables(
          gettext,
          ngettext,
          newstyle=newstyle,
          pgettext=pgettext,
          npgettext=npgettext,
      )
  
imports: import pprint
  import re
  import typing
  from markupsafe import Markup
  from .None import defaults
  from .None import nodes
  from .environment import Environment
  from .exceptions import TemplateAssertionError
  from .exceptions import TemplateSyntaxError
  from .runtime import concat
  from .runtime import Context
  from .runtime import Undefined
  from .utils import import_string
  from .utils import pass_context
label_desc: Use image node_id 2 for calling the InternationalizationExtension obj's underlying member method code with example usage: obj._install(translations, newstyle) without return types