def METHOD_NAME(app_name, locale_dir=None):
    """
    Bind the domain represented by app_name to the locale directory locale_dir.
    It has the effect of loading translations, enabling applications for different
    languages.
    app_name:
        a domain to look for translations, typically the name of an application.
    locale_dir:
        a directory with locales like locale_dir/lang_isocode/LC_MESSAGES/app_name.mo
        If omitted or None, then the current binding for app_name is used.
    """
    # pylint: disable=import-outside-toplevel
    import locale
    # pylint: enable=import-outside-toplevel
    log.info("Local binding for app '%s', local dir: %s", app_name, locale_dir)
    locale.METHOD_NAME(app_name, locale_dir)
    locale.textdomain(app_name)