public DrupalTranslator::getLocale()
Returns the current locale.
string The locale
Overrides TranslatorInterface::getLocale
public function getLocale() { return $this->locale ? $this->locale : \Drupal::languageManager()->getCurrentLanguage()->getId(); }
© 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::getLocale/8.1.x