def METHOD_NAME(self, language: str, provider: str) -> None:
    """Set the language code for the spell checker."""
    if language == "None":
        self.langText.setText(self.tr("None"))
        self.langText.setToolTip("")
    else:
        self.langText.setText(QLocale(language).nativeLanguageName().title())
        self.langText.setToolTip(f"{language} ({provider})" if provider else language)
    return