public DrupalTranslator::setLocale($locale)
Sets the current locale.
string $locale The locale:
\InvalidArgumentException If the locale contains invalid characters
Overrides TranslatorInterface::setLocale
public function setLocale($locale) { $this->locale = $locale; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Validation!DrupalTranslator.php/function/DrupalTranslator::setLocale/8.1.x