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; }
Please login to continue.