@php $adminLocale = app()->getLocale(); $adminEnglish = \App\Support\TranslationCatalog::module('en', 'admin'); $adminSelected = \App\Support\TranslationCatalog::module($adminLocale, 'admin'); // Display captions also come from legacy modules. Make those available // to charts and other shared JavaScript without changing their keys. foreach (['label', 'common'] as $module) { foreach (\App\Support\TranslationCatalog::module('en', $module) as $key => $text) { $alias = '__'.$module.'_'.$key; $adminEnglish[$alias] = $text; $adminSelected[$alias] = ___($module.'.'.$key, [], $adminLocale); } } $adminStrings = $adminEnglish; foreach ($adminSelected as $key => $text) { if (is_string($text) && trim($text) !== '') { $adminStrings[$key] = $text; } } @endphp