You are here

public function IdentityTranslator::getLocale in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/translation/IdentityTranslator.php \Symfony\Component\Translation\IdentityTranslator::getLocale()

Returns the current locale.

Return value

string The locale

Overrides TranslatorInterface::getLocale

1 call to IdentityTranslator::getLocale()
IdentityTranslator::transChoice in vendor/symfony/translation/IdentityTranslator.php
Translates the given choice message by choosing a translation according to a number.

File

vendor/symfony/translation/IdentityTranslator.php, line 45

Class

IdentityTranslator
IdentityTranslator does not translate anything.

Namespace

Symfony\Component\Translation

Code

public function getLocale() {
  return $this->locale ?: \Locale::getDefault();
}