Implements \Symfony\Component\Translation\TranslatorInterface::getLocale().
Overrides TranslatorInterface::getLocale
File
- drupal/core/lib/Drupal/Core/Validation/DrupalTranslator.php, line 58
- Contains \Drupal\Core\Validation\DrupalTranslator.
Class
- DrupalTranslator
- Translates strings using Drupal's translation system.
Namespace
Drupal\Core\Validation
Code
public function getLocale() {
return $this->locale ? $this->locale : language(Language::TYPE_INTERFACE)->langcode;
}