@php $uiLocale = request()->attributes->get('ui_locale', 'ja'); $htmlLang = ['ja'=>'ja','en'=>'en','ko'=>'ko','zh-cn'=>'zh-Hans','zh-tw'=>'zh-Hant'][$uiLocale] ?? 'ja'; $base = request()->getSchemeAndHttpHost() . request()->getBaseUrl(); $p = request()->getPathInfo(); $q = request()->getQueryString(); $sfx = ($p === '/' ? '' : $p) . ($q ? '?'.$q : ''); $altUrls = []; foreach (array_keys(config('app.locales')) as $lc) { $altUrls[$lc] = $base . ($lc === 'ja' ? '' : '/'.$lc) . $sfx; } @endphp