resolveCurrentLanguageCode = () =>  {
    const autoDetect = globalObj._state._userConfig.language.autoDetect;

    if (autoDetect) {
        debug('CookieConsent [LANG]: autoDetect strategy: "' + autoDetect + '"');

        const detectionStrategies = {
            browser: getBrowserLanguageCode(),
            document: getDocumentLanguageCode()
        };

        /**
         * @type {string}
         */
        const newLanguageCode = getAvailableLanguage(detectionStrategies[autoDetect]);

        if (newLanguageCode)
            return newLanguageCode;
    }

    /**
     * Use current language
     */
    return getCurrentLanguageCode();
}
Resolve the language to use.
@returns {string} language code