function updateDetectedLanguage(languageCode, state) {
    if (languageCode && typeof languageCode === 'string') {
        const validLanguage = enabledTranslation(languageCode, state || getState());
        updateTranslationFound(validLanguage);
        detectedLanguageSpan.textContent = languageCode;
        return;
    }

    detectedLanguageSpan.textContent = '-';
    translationFoundSpan.textContent = '-';
}
@param {string|boolean} languageCode
@param {typeof defaultState} [state]