CodeExplorer translateAssets example
foreach ($this->
getAssetsIds($domain) as $id) { $keysIdsMap[$this->
retrieveKeyFromId($id,
$domain)] =
$id;
} $assets =
[];
foreach ($keysIdsMap as $key =>
$id) { if (isset($messages[$key])) { $assets[$id] =
$messages[$key];
} } $this->
translateAssets($assets,
$locale);
} } } public function read(array
$domains, array
$locales): TranslatorBag
{ $domains =
$domains ?:
['*'
];
$translatorBag =
new TranslatorBag();
foreach ($locales as $locale) { foreach ($domains as $domain) {