def METHOD_NAME(config):
    # Add the request attributes
    config.add_request_method(_locale, name="locale", reify=True)
    config.add_request_method(_localize, name="_")
    # Register our translation directory.
    config.add_translation_dirs("warehouse:locale/")
    config.set_locale_negotiator(_negotiate_locale)
    config.get_settings().setdefault(
        "jinja2.i18n_extension", FallbackInternationalizationExtension
    )
    # Register our i18n/l10n filters for Jinja2
    filters = config.get_settings().setdefault("jinja2.filters", {})
    filters.setdefault("format_date", "warehouse.i18n.filters:format_date")
    filters.setdefault("format_datetime", "warehouse.i18n.filters:format_datetime")
    filters.setdefault(
        "format_rfc822_datetime", "warehouse.i18n.filters:format_rfc822_datetime"
    )
    filters.setdefault("format_number", "warehouse.i18n.filters:format_number")
    jglobals = config.get_settings().setdefault("jinja2.globals", {})
    jglobals.setdefault("KNOWN_LOCALES", "warehouse.i18n:KNOWN_LOCALES")
    config.add_view_deriver(
        translated_view, over="rendered_view", under=viewderivers.INGRESS
    )