Assign the dialect.

@param string|object $dialect (string or object with __toString)

@return self
1296
public function setDialect($dialect)
    {
        if (!Type::isStringLike($dialect)) {
            throw new InvalidArgumentException('Dialect hast to be stringlike, not ' . Type::of($dialect));
        }
        $this->dialect = $dialect;
        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;
    }
1193885
public function setLocale(string $locale): self
	{
		if ($locale === '') {
			$this->locale = $locale;
		} else {
			if (!\Locale::parseLocale($locale)) {
				throw new \InvalidArgumentException(sprintf('Invalid locale "%s"', $locale));
			}
			$this->locale = \Locale::canonicalize($locale);
		}

		$this->setOptions['locale'] = null;

		return $this;
	}
152110
public function assign($dbRecord)
    {
        parent::assign($dbRecord);
        // workaround for firefox showing &lang= as &9001;= entity, mantis#0001272

        if ($this->oxcontents__oxcontent) {
            $this->oxcontents__oxcontent->setValue(str_replace('&lang=', '&amp;lang=', $this->oxcontents__oxcontent->value), \OxidEsales\Eshop\Core\Field::T_RAW);
        }
    }
914705
public function setLang($lang)
    {
        if (2 !== strlen($lang)) {
            throw new \InvalidArgumentException('Language identifier should be 2 characters long.');
        }

        if (!in_array($lang, $this->getSupportedLanguages())) {
            throw new \InvalidArgumentException(sprintf('Language "%s" is not supported.', $lang));
        }

        $this->lang = $lang;

        return $this;
    }
817482
public function withExpression(string $expression): self
    {
        if (!(new \ReflectionClass($expression))->implementsInterface(Expression::class)) {
            throw new DomainException($expression);
        }

        $self = clone $this;
        $self->expression = new $expression($self->name);

        return $self;
    }
507488
public function setLanguage($language)
    {
        if (!array_key_exists($language, $this->allowedlanguages)) {
            throw new InvalidArgumentException("Invalid language ISO code");
        }
        $this->parameters['language'] = $language;
    }
752249
public function withMethod(string $method): self {
        if ($this->method === $method) {
            return $this;
        }

        $clone = clone $this;
        $clone->method = $method;

        return $clone;
    }
473113
public function set(string $str): self
    {
        $this->str = $this->inputConv($str);

        return $this;
    }
66909
public function setDefaultLanguage($language)
    {
        $language = (string) $language;
        if ($language === '') {
            throw new \InvalidArgumentException('$language cannot be empty');
        }

        $this->defaultLanguage = $language;
    }
40783
public function setupLanguage($language = 'english')
    {
        $this
            ->addIndexAnalyzer($language)
            ->addSuggestionAnalyzer($language)
            ->addStripSpecialCharsFilter()
            ->addNGramTokenizer()
            ->addStopWordsFilter($language)
            ->addStemmerFilter($language);

        return $this;
    }
1127201
public function change(string $db): self
  {
    if ( $this->language->change($db) ){
      $this->current = $db;
    }
    return $this;
  }
918980
public function toInstance($instance) : self
    {
        $this->untarget = null;
        $this->bound = new Instance($instance);
        $this->container->add($this);

        return $this;
    }
365133
public function setMethod(string $method) : self
    {
        if ($method == 'GET') {
            $this->setCsrf(false);
        }

        return $this->addAttribute('method', $method);
    }
1288289
def set_dialect(dialect):
    '''
    '''
    global mavlink, current_dialect
    from .generator import mavparse
    if 'MAVLINK20' in os.environ:
        wire_protocol = mavparse.PROTOCOL_2_0
        modname = "pymavlink.dialects.v20." + dialect
    elif mavlink is None or mavlink.WIRE_PROTOCOL_VERSION == "1.0" or not 'MAVLINK09' in os.environ:
        wire_protocol = mavparse.PROTOCOL_1_0
        modname = "pymavlink.dialects.v10." + dialect
    else:
        wire_protocol = mavparse.PROTOCOL_0_9
        modname = "pymavlink.dialects.v09." + dialect

    try:
        mod = __import__(modname)
    except Exception:
        # auto-generate the dialect module
        from .generator.mavgen import mavgen_python_dialect
        mavgen_python_dialect(dialect, wire_protocol)
        mod = __import__(modname)
    components = modname.split('.')
    for comp in components[1:]:
        mod = getattr(mod, comp)
    current_dialect = dialect
    mavlink = mod
881936
def set_language(self, language, dialect=None):
        
        self.currentAction = 'setting language'
        l = 0
        if language == 'en':
            l = 0
        elif language == 'es':
            l = 1

            if dialect == 'ca':
                l = 2

        self.queue.put('l%s' % (l))
1298924
public function setLang($str)
    {
        $str = strtolower($str);
        
        if ($str == 'ar' || $str == 'en') {
            $this->_lang = $str;
        }
        
        return $this;
    }