DrupalTranslator::setLocale

public DrupalTranslator::setLocale($locale)

Sets the current locale.

Parameters

string $locale The locale:

Throws

\InvalidArgumentException If the locale contains invalid characters

Overrides TranslatorInterface::setLocale

File

core/lib/Drupal/Core/Validation/DrupalTranslator.php, line 58

Class

DrupalTranslator
Translates strings using Drupal's translation system.

Namespace

Drupal\Core\Validation

Code

public function setLocale($locale) {
  $this->locale = $locale;
}
doc_Drupal
2016-10-29 09:03:08
Comments
Leave a Comment

Please login to continue.