CodeExplorer initLocales example
private function generateCacheKey(string
$locale, string
$domain, array
$options): string
{ array_multisort($options);
return sprintf('%s.%s.%s',
$locale,
$domain,
sha1(serialize($options)));
} private function getLocale(string
$locale): string
{ if (!
$this->phraseLocales
) { $this->
initLocales();
} $phraseCode =
str_replace('_', '-',
$locale);
if (!\
array_key_exists($phraseCode,
$this->phraseLocales
)) { $this->
createLocale($phraseCode);
} return $this->phraseLocales
[$phraseCode]['id'
];
}