Adds a language to the list of supported languages

@Action
@Logged
@param string $language
6482
public function addSupportedLanguage($language, $name = "defaultTranslationService", $selfedit="false") {
		$this->addTranslationLanguageFromService(($selfedit == "true"), $name, $language);
		
		// Once more to reaload languages list
		$this->supportedLanguages($name, $selfedit);
	}
110569
protected function setActiveLanguage($language)
    {
        $languages = \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageIds();
        $languageId = array_search($language, $languages);
        if ($languageId === false) {
            throw new Exception("Language $language was not found or is not active in shop");
        }
        \OxidEsales\Eshop\Core\Registry::getLang()->setBaseLanguage($languageId);
    }
226861
public function setLanguage($lang)
    {
        $this->clearCachedValueIf($this->lang != $lang);
        $this->lang = $lang;
    }
623065
final protected function loadTranslations($language)
    {
        // Don't load the same language twice, if that's the case
        if ($this->appConfig->getLanguage() !== $language) {

            $this->appConfig->setLanguage($language);
            $this->loadTranslationMessages($language);
            return true;

        } else {
            return false;
        }
    }
280473
public function setLanguage(Language\Language $language)
    {
        $this->factory->setLanguage($language);
        $this->pushLanguage();
    }
1199407
public function doesAcceptLanguage($language = 'en')
	{
		return (in_array(strtolower($language), $this->getAcceptLanguages(), true)) ? true : false;
	}
724684
public function setLanguage(\Core\Entity\Language $language = null) {
        $this->language = $language;

        return $this;
    }
868700
public function setLanguage($value)
    {
        //$value = strtolower($value);
        if (!isset($this->owner->{$this->translationsAttribute}[$value])) {
            $this->owner->{$this->translationsAttribute}[$value] = $this->loadTranslation($value);
        }
        $this->_language = $value;
    }
1271010
public function setLanguage($language)
    {
        if (!Icepay_Parameter_Validation::language($language))
            throw new Exception('Please enter a valid language (ISO 639-1)', 1006);

        $this->language = $language;
        return $this;
    }
662999
public function forceLanguage($language) {
		$changeLanguage = false;
		// Check if the user set null to retrieve the initial language
		// If the initial language is already recovered fine don't require the file
		if($language === null) {
			// Save old language
			$language = $this->language;
			// Retrieve initial language
			$this->initLanguage();
			// Chekck if the language change
			if($this->language != $language) {
				$changeLanguage = true;
			}
		}
		// If the user ask a new language not set
		elseif($this->language != $language) {
			$this->language = $language;
			$changeLanguage = true;
		}
		
		// Empty all the old language
		if($changeLanguage) {
			$this->loadFile = array();
			$this->msg = null;
		}
	}
840205
public function addTranslation($translator)
	{
		if (!file_exists( $this->getPath().'/'.TRANSLATIONS )) return;
		$translator->addTranslation( $this->getPath().'/'.TRANSLATIONS );
	}
113679
private function setIfAllowed($lang)
    {
        $allowedLangs = array_keys(Localizer::allowedLanguages());
        if (config('localizer.block_unallowed_langs') && !in_array($lang, $allowedLangs)) {
            $lang = $allowedLangs[0];
        }

        App::setLocale($lang);
        if (config('localizer.carbon')) {
            Carbon::setLocale($lang);
        }
    }
1105213
public function setMessages(array $messages, $language) {
		$messageFile = $this->getMessageLanguageForLanguage($language);
		$messageFile->setMessages($messages);
		$messageFile->save();
	}
225927
protected function pushLanguage()
    {
        $language = $this->factory->getLanguage();

        if ($language && $this->parserData) {
            $fields = $this->parserData->getFields();
            foreach ($fields as &$field) {
                $field->setLanguage($this->factory->getLanguage());
            }
        }
    }
361594
public function updateLanguage(Language $language)
    {
        try {
            return $this->innerGateway->updateLanguage($language);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
1023735
public static function setLanguage($lang)
    {
        static::$_appLanguage = Yii::$app->language;

        Yii::$app->language = $lang;
    }
507488
public function setLanguage($language)
    {
        if (!array_key_exists($language, $this->allowedlanguages)) {
            throw new InvalidArgumentException("Invalid language ISO code");
        }
        $this->parameters['language'] = $language;
    }