🌐 Introduce dynamic domain-based locale and country handling

- Added `DomainMiddleware` to dynamically set locale, language-country session, and app name based on domain.
- Updated views and components to leverage `lang_country` session for language and region-specific content.
- Enhanced country parameter retrieval with `config('app.domain_country')` as fallback.
- Refined language filtering by scanning available language files dynamically.
- Added language-specific assets and translations (`nl.json`, `es.json`) with improved language-region associations.
- Updated `app-logo-icon` to display region-specific images or default SVGs.
- Improved views with cleaner, dynamic rendering and session-aware functionalities.
This commit is contained in:
HolgerHatGarKeineNode
2025-11-23 20:45:29 +01:00
parent c48455a6be
commit 6f7ee806ae
32 changed files with 962 additions and 42 deletions

View File

@@ -13,12 +13,12 @@ class extends Component {
public function goToMeetups(): void
{
$this->redirect(route('meetups.index', ['country' => str(session('lang_country', 'de'))->after('-')->lower()]), navigate: true);
$this->redirect(route('meetups.index', ['country' => str(session('lang_country', config('app.domain_country')))->after('-')->lower()]), navigate: true);
}
public function goToMap(): void
{
$this->redirect(route('meetups.map', ['country' => str(session('lang_country', 'de'))->after('-')->lower()]), navigate: true);
$this->redirect(route('meetups.map', ['country' => str(session('lang_country', config('app.domain_country')))->after('-')->lower()]), navigate: true);
}
}; ?>
@@ -60,7 +60,7 @@ class extends Component {
{{ __('Kartenansicht öffnen') }}
</flux:button>
<flux:button :href="route('dashboard', ['country' => str(session('lang_country', 'de'))->after('-')->lower()])" class="cursor-pointer w-full"
<flux:button :href="route('dashboard', ['country' => str(session('lang_country', config('app.domain_country')))->after('-')->lower()])" class="cursor-pointer w-full"
icon="arrow-right-start-on-rectangle">
{{ __('Login') }}
</flux:button>