def METHOD_NAME(lang: str = None) -> None:
    from PyQt5.QtCore import QCoreApplication, QTranslator, QLocale
    if not lang:
        lang = str(QLocale.system().name())[:2]
    localename = get_locale_name(lang)
    if localename is not None:
        try:
            locale.setlocale(locale.LC_ALL, localename)
        except locale.Error:
            logging.warning("Couldn't set locale %s", localename)
    else:
        lang = "en"
    qtr1 = QTranslator(QCoreApplication.instance())
    qtr1.load(":/qt_%s" % lang)
    QCoreApplication.installTranslator(qtr1)
    qtr2 = QTranslator(QCoreApplication.instance())
    qtr2.load(":/%s" % lang)
    QCoreApplication.installTranslator(qtr2)
    def qt_tr(s: str, context: Union[str, None] = "core") -> str:
        if context is None:
            context = "core"
        return str(QCoreApplication.translate(context, s, None))
    set_tr(qt_tr)