public function Translator::getCatalogue in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/translation/Translator.php \Symfony\Component\Translation\Translator::getCatalogue()
Gets the catalogue by locale.
Parameters
string|null $locale The locale or null to use the default:
Return value
Throws
\InvalidArgumentException If the locale contains invalid characters
Overrides TranslatorBagInterface::getCatalogue
2 calls to Translator::getCatalogue()
- Translator::getMessages in vendor/
symfony/ translation/ Translator.php - Collects all messages for the given locale.
- Translator::transChoice in vendor/
symfony/ translation/ Translator.php - Translates the given choice message by choosing a translation according to a number.
File
- vendor/
symfony/ translation/ Translator.php, line 239
Class
- Translator
- Translator.
Namespace
Symfony\Component\TranslationCode
public function getCatalogue($locale = null) {
if (null === $locale) {
$locale = $this
->getLocale();
}
else {
$this
->assertValidLocale($locale);
}
if (!isset($this->catalogues[$locale])) {
$this
->loadCatalogue($locale);
}
return $this->catalogues[$locale];
}