@param \BiberLtd\Bundle\MultiLanguageSupportBundle\Entity\Language $language

@return $this
196448
public function setLanguage(\BiberLtd\Bundle\MultiLanguageSupportBundle\Entity\Language $language) {
        if($this->setModified('language', $language)->isModified()) {
            $this->language = $language;
        }

        return $this;
    }
64538
public function addTranslation(\Haven\WebBundle\Entity\FaqTranslation $translations) {
        $translations->setParent($this);
        $this->translations[] = $translations;

        return $this;
    }
1117153
public function setTense(\Innova\LexiconBundle\Entity\Tense $tense = null)
    {
        $this->tense = $tense;

        return $this;
    }
560959
public function save($file = null): Language
    {
        if (is_null($file) && is_null($this->file)) {
            throw LanguageException::forFileNotSet();
        }

        if (is_null($file)) {
            $file = $this->file;
        }

        $contents = "<?php //-->\nreturn " . var_export($this->data, true) . ";";
        file_put_contents($file, $contents);

        return $this;
    }
1215597
public function format($format, $language = 'en')
    {
        $this->format = $format;
        $this->language = $language;

        return $this;
    }
787482
public function translate($language = null, $fallback = true)
    {
        if ($this->relationLoaded('translations')) {
            $this->load('translations');
        }

        return (new Translator($this))->translate($language, $fallback);
    }
165737
public function langset($lang = null)
    {
        if (!is_null($lang)) {
            $this->langset = $lang;
            return $this;
        } else {
            return $this->langset ?: '';
        }
    }
50311
public function removeEntry($entryId, $language = null)
    {
        $entryId = (string)$entryId;
        foreach ($this->entries as $languageKey => $entries) {
            if ($language && $language !== $languageKey) {
                continue;
            }
            if (isset($this->entries[$languageKey][$entryId])) {
                unset($this->entries[$languageKey][$entryId]);
            }
        }
        return $this;
    }
27232
public function insertLanguage(Language $language)
    {
        $query = $this->dbHandler->createSelectQuery();
        $query->select(
            $query->expr->max($this->dbHandler->quoteColumn('id'))
        )->from($this->dbHandler->quoteTable('ezcontent_language'));

        $statement = $query->prepare();
        $statement->execute();

        $lastId = (int)$statement->fetchColumn();

        // Legacy only supports 8 * PHP_INT_SIZE - 2 languages:
        // One bit cannot be used because PHP uses signed integers and a second one is reserved for the
        // "always available flag".
        if ($lastId == (2 ** (8 * PHP_INT_SIZE - 2))) {
            throw new RuntimeException('Maximum number of languages reached!');
        }
        // Next power of 2 for bit masks
        $nextId = ($lastId !== 0 ? $lastId << 1 : 2);

        $query = $this->dbHandler->createInsertQuery();
        $query->insertInto(
            $this->dbHandler->quoteTable('ezcontent_language')
        )->set(
            $this->dbHandler->quoteColumn('id'),
            $query->bindValue($nextId, null, \PDO::PARAM_INT)
        );
        $this->setCommonLanguageColumns($query, $language);

        $query->prepare()->execute();

        return $nextId;
    }
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);
        }
    }
484744
public function setLanguageDetail(\BlackForest\PiwikBundle\Entity\PiwikLanguage $languageDetail = null)
    {
        $this->languageDetail = $languageDetail;

        return $this;
    }
67269
public function lang($lang = NULL)
	{
		if ( ! func_num_args())
		{
			return $this->_lang;
		}
		$this->_lang = $lang;
		return $this;
	}
685127
public function filterLanguage($language)
    {
        $countries = array();
        foreach ($this->countries as $country) {
            if ($country->getLanguages()->contains($language)) {
                $countries[] = $country;
            }
        }

        return new self($countries);
    }
907873
public function update(Language $language)
    {
        $this->innerHandler->update($language);
        $this->storeCache([$language]);
    }
757493
public function addTranslation(\Haven\PersonaBundle\Entity\CountryTranslation $translations)
    {
        $this->translations[] = $translations;

        return $this;
    }
1204607
public static function set($language = null)
    {
        self::$messages = array();
        $language = $language ?: self::$config['language'];
        $filename = Atomik::findFile("$language.php", Atomik::path(self::$config['dir']));
        if ($filename === false) {
            throw new AtomikException("Language '$language' does not exists");
        }
        
        $messages = include $filename;
        if (is_array($messages)) {
            self::$messages = array_merge(self::$messages, $messages);
        }
        
        Atomik::set('app.language', $language);
        self::$config['language'] = $language;
        if (isset($_SESSION)) {
            $_SESSION['__LANG'] = $language;
        }
    }
1367499
@NotNull
    @ObjectiveCName("addPreferredLanguage:")
    public ConfigurationBuilder addPreferredLanguage(String language) {
        if (!preferredLanguages.contains(language)) {
            preferredLanguages.add(language);
        }
        return this;
    }