Files
Toiminnanohjaus/resources/views/pages/⚡home.blade.php
T
petriandClaude Opus 5.5 8aead06972 Add English to the UI and a profile menu for language and theme
Every UI string now exists in lang/fi and lang/en; a unit test checks that
both languages have the same keys and placeholders. A user's language is
stored on the account (users.locale) and applied by the SetLocale web
middleware, falling back to the session's choice on signed-out pages and
then APP_LOCALE. Emails use the user's language through
HasLocalePreference, and the login page keeps the language after logout.

The header's name, theme toggle and logout button become one profile menu
(a disclosure) with the language buttons, light/dark/system theme radios
kept on the device, and logging out. Signed-out pages get a Suomi/English
switch next to the theme toggle.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 06:28:39 +02:00

32 lines
770 B
PHP

<?php
use Livewire\Component;
new class extends Component
{
public int $clickCount = 0;
public function incrementClickCount(): void
{
$this->clickCount++;
}
public function render(): mixed
{
return $this->view()->title(__('layout.demo.title'));
}
};
?>
<div class="mx-auto max-w-xl space-y-6 p-6">
<h1 class="text-2xl font-semibold">{{ __('layout.demo.title') }}</h1>
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('layout.demo.intro') }}</p>
<x-button icon="plus" wire:click="incrementClickCount" :text="__('layout.demo.add_click')" />
<p role="status" aria-live="polite" aria-atomic="true" class="text-sm">
{{ __('layout.demo.clicked', ['count' => $clickCount]) }}
</p>
</div>