enableLanguage(languageCode) {
      let languageCodes = this.settingsPrefs_.prefs.intl.accept_languages.value;
      const languages = languageCodes.split(',');
      if (languages.indexOf(languageCode) != -1)
        return;
      languages.push(languageCode);
      languageCodes = languages.join(',');
      this.settingsPrefs_.set(
          'prefs.intl.accept_languages.value', languageCodes);
      if (cr.isChromeOS) {
        this.settingsPrefs_.set(
            'prefs.settings.language.preferred_languages.value', languageCodes);
      }
    }
/**
     * Enables a language, adding it to the Accept-Language list (used to decide
     * which languages to translate, generate the Accept-Language header, etc.).
     * @param {string} languageCode
     */
Enables a language, adding it to the Accept-Language list (used to decide
which languages to translate, generate the Accept-Language header, etc.).
@param {string} languageCode
Enables a language adding it to the Accept - Language list ( used to decide which languages to translate generate the Accept - Language header etc . ) . @param { string } languageCode
enableLanguage(languageCode) {
      let languageCodes = this.settingsPrefs_.prefs.intl.accept_languages.value;
      const languages = languageCodes.split(',');
      if (languages.indexOf(languageCode) != -1)
        return;
      languages.push(languageCode);
      languageCodes = languages.join(',');
      this.settingsPrefs_.set(
          'prefs.intl.accept_languages.value', languageCodes);
      if (cr.isChromeOS) {
        this.settingsPrefs_.set(
            'prefs.settings.language.preferred_languages.value', languageCodes);
      }
    }
enableLanguage ( languageCode ) { let languageCodes = this . settingsPrefs_ . prefs . intl . accept_languages . value ; const languages = languageCodes . split ( ',' ) ; if ( languages . indexOf ( languageCode ) != - 1 ) return ; languages . push ( languageCode ) ; languageCodes = languages . join ( ',' ) ; this . settingsPrefs_ . set ( 'prefs.intl.accept_languages.value' , languageCodes ) ; if ( cr . isChromeOS ) { this . settingsPrefs_ . set ( 'prefs.settings.language.preferred_languages.value' , languageCodes ) ; } }
Enables a language, adding it to the Accept-Language list (used to decide
 which languages to translate, generate the Accept-Language header, etc.).
Enables a language adding it to the Accept - Language list ( used to decide which languages to translate generate the Accept - Language header etc . ) .