docs: async def startup(self, app):
          """Initialize a local namespace and setup Jinja2."""
          self.local = slocal(app.loop)
          if self.cfg.configure_jinja2 and 'jinja2' in app.ps:
              app.ps.jinja2.env.add_extension('jinja2.ext.i18n')
              app.ps.jinja2.env.install_gettext_callables(
                  lambda x: self.get_translations().ugettext(x),
                  lambda s, p, n: self.get_translations().ungettext(s, p, n),
                  newstyle=True
              )
  
          if self.locale_selector_func:
              app.middlewares.append(self._middleware)