@param $name
@param $language

@return $this
558020
protected function setPublication($name, $language)
    {
        self::$xml['name'] = '<news:publication>';
        $this->setPublicationName($name);
        $this->setPublicationLanguage($language);
        self::$xml['name'] .= '</news:publication>';

        return $this;
    }
1363712
public function setLang($lang, $name, $sectionName = null, $elementName = null)
    {
        $setting = ['NAME' => $name];

        if ($sectionName) {
            $setting['SECTION_NAME'] = $sectionName;
        }
        if ($elementName) {
            $setting['ELEMENT_NAME'] = $elementName;
        }

        $this->fields['LANG'][$lang] = $setting;

        return $this;
    }
1349662
public function setLocale($lang, $territory = null)
    {
        $lang = strtolower($lang);

        $this->setObject(
            'locale',
            (isset($territory) ? $lang . '_' . strtoupper($territory) : $lang)
        );

        return $this;
    }
229882
public function specialTid($name, $language = null)
    {
        $siteroot = $this->currentSiteroot();

        if (!$siteroot) {
            throw new \LogicException('Siteroot could not be determined.');
        }

        if (!$language) {
            $language = $this->requestStack->getCurrentRequest()->getLocale();
        }

        return $siteroot->getSpecialTid($language, $name);
    }
66909
public function setDefaultLanguage($language)
    {
        $language = (string) $language;
        if ($language === '') {
            throw new \InvalidArgumentException('$language cannot be empty');
        }

        $this->defaultLanguage = $language;
    }
671288
public function setLanguage($lang)
	{
		$this->lang     = $lang;
		$this->metadata = $this->getMetadata($this->lang);

		return $this;
	}
1260106
public function setLanguage($lang)
    {
      if (isset($this->commonUploadErrors[$lang])) {
        $this->language = $lang;
      } else {
        $this->error = $this->commonUploadErrors[$this->language]['ERROR_09'];
      }

      return $this;
    }
692740
public function setLanguage($language)
    {
        if (Switcher::getRedirect() == 'route') {
            return redirect(Switcher::getRedirectRoute())->withCookie(Switcher::setLanguage($language));
        }
        if (Switcher::getRedirect() == 'locale') {
            return redirect(Switcher::getLocalBack($language))->withCookie(Switcher::setLanguage($language));
        }
        return back()->withCookie(Switcher::setLanguage($language));
    }
1233034
public function usingCallback(string $name, $instance): self
    {
        $this->xslCallbacks->addCallback($name, $instance);
        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;
        }
    }
22828
public function setLanguage(\Innova\LexiconBundle\Entity\Language $language = null)
    {
        $this->language = $language;

        return $this;
    }
280473
public function setLanguage(Language\Language $language)
    {
        $this->factory->setLanguage($language);
        $this->pushLanguage();
    }
796643
static function setDefaultLanguage(string $language) {
        if(!\class_exists($language, true)) {
            throw new \InvalidArgumentException('Unknown language class');
        } elseif(!\in_array(\CharlotteDunois\Validation\LanguageInterface::class, \class_implements($language), true)) {
            throw new \InvalidArgumentException('Invalid language class (not implementing language interface)');
        }
        
        static::$defaultLanguage = $language;
    }
651419
public function newParameterPart($name, $value, $language = null)
    {
        return new ParameterPart($this->charsetConverter, $name, $value, $language);
    }
49847
public function setName($name) {
    /** @var TokenNode $function_name */
    $function_name = $this->getName()->firstChild();
    $function_name->setText($name);
    return $this;
  }
632427
public function setName($name)
    {
        if (!empty($name) && ctype_print($name)) {
            $this->name = trim($name);
        }

        return $this;
    }
919751
public static function setLanguage($language)
    {
        if (! ($language instanceof Language)) {
            $language = Language::findByCode($language);
        }

        if (! $language) {
            return false;
        }

        App::setLocale($language->code);
        request()->setDefaultLocale($language->code);
        self::$language = $language;

        return $language;
    }