Certified/resources/views/components/language-switcher.blade.php
Joël van de Wouw ac340d125c
Some checks failed
linter / quality (push) Failing after 13s
tests / ci (8.3) (push) Failing after 2s
tests / ci (8.4) (push) Failing after 2s
tests / ci (8.5) (push) Failing after 3s
Initial commit
Certificate manager built on Laravel 13, Livewire 4, and Flux.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-12 14:44:58 +02:00

24 lines
778 B
PHP

@props(['sidebar' => false])
<flux:dropdown position="top" align="start">
@if ($sidebar)
<flux:sidebar.item icon="language">
{{ \App\Enums\Locale::from(app()->getLocale())->label() }}
</flux:sidebar.item>
@else
<flux:button icon="language" variant="ghost" size="sm">
{{ strtoupper(app()->getLocale()) }}
</flux:button>
@endif
<flux:menu>
@foreach (\App\Enums\Locale::cases() as $locale)
<flux:menu.item
:href="route('language.switch', $locale->value)"
:icon="app()->getLocale() === $locale->value ? 'check' : null"
>
{{ $locale->label() }}
</flux:menu.item>
@endforeach
</flux:menu>
</flux:dropdown>