Gateway/Config/Config.php
public function getIntegrationLanguage() {
        // Get and format the user language
        $userLanguage = $this->localeResolver->getLocale();
        $userLanguage = strtoupper(str_replace('_', '-', $userLanguage));

        // Get and format the supported languages
        $supportedLanguages = [];
        foreach (self::getSupportedLanguages() as $arr) {
            $supportedLanguages[] = $arr['value'];
        }

        // Get the fallback language
        $fallbackLanguage = $this->getValue(
            self::KEY_FALLBACK_LANGUAGE,
            $this->storeManager->getStore()
        );

        // Compare user language with supported
        if (in_array($userLanguage, $supportedLanguages)) {
            return $userLanguage;
        }
        else {
            return ($fallbackLanguage) ? $fallbackLanguage : 'EN-EN';
        }
    }
public function getIntegrationLanguage() {
        // Get and format the user language
        $userLanguage = $this->localeResolver->getLocale();
        $userLanguage = strtoupper(str_replace('_', '-', $userLanguage));

        // Get and format the supported languages
        $supportedLanguages = [];
        foreach (self::getSupportedLanguages() as $arr) {
            $supportedLanguages[] = $arr['value'];
        }

        // Get the fallback language
        $fallbackLanguage = $this->getValue(
            self::KEY_FALLBACK_LANGUAGE,
            $this->storeManager->getStore()
        );

        // Compare user language with supported
        if (in_array($userLanguage, $supportedLanguages)) {
            return $userLanguage;
        }
        else {
            return ($fallbackLanguage) ? $fallbackLanguage : 'EN-EN';
        }
    }
public function getIntegrationLanguage ( ) { // Get and format the user language $ userLanguage = $ this -> localeResolver -> getLocale ( ) ; $ userLanguage = strtoupper ( str_replace ( '_' , '-' , $ userLanguage ) ) ; // Get and format the supported languages $ supportedLanguages = [ ] ; foreach ( self :: getSupportedLanguages ( ) as $ arr ) { $ supportedLanguages [ ] = $ arr [ 'value' ] ; } // Get the fallback language $ fallbackLanguage = $ this -> getValue ( self :: KEY_FALLBACK_LANGUAGE , $ this -> storeManager -> getStore ( ) ) ; // Compare user language with supported if ( in_array ( $ userLanguage , $ supportedLanguages ) ) { return $ userLanguage ; } else { return ( $ fallbackLanguage ) ? $ fallbackLanguage : 'EN-EN' ; } }
Returns the integration language.

@return string
Returns the integration language .