You are here

public function Translator::setLocale in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/translation/Translator.php \Symfony\Component\Translation\Translator::setLocale()

Sets the current locale.

Parameters

string $locale The locale:

Throws

\InvalidArgumentException If the locale contains invalid characters

Overrides TranslatorInterface::setLocale

1 call to Translator::setLocale()
Translator::__construct in vendor/symfony/translation/Translator.php
Constructor.

File

vendor/symfony/translation/Translator.php, line 141

Class

Translator
Translator.

Namespace

Symfony\Component\Translation

Code

public function setLocale($locale) {
  $this
    ->assertValidLocale($locale);
  $this->locale = $locale;
}