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]>
This commit is contained in:
2026-11-25 06:28:39 +02:00
co-authored by Claude Opus 5.5
parent c2265256c3
commit 8aead06972
40 changed files with 2197 additions and 44 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
return [
'title' => 'Company details',
'intro' => 'The company details are printed on receipts, and the menu name is shown at the left edge of the main menu. The VAT number is formed from the business ID.',
'fields' => [
'name' => 'Company name',
'menu_name' => 'Menu name',
'menu_name_hint' => 'Shown at the left edge of the main menu. If left empty, the name Toiminnanohjaus is used.',
'business_id' => 'Business ID',
'business_id_hint' => 'For example 1234567-8.',
'address' => 'Address',
'address_hint' => 'Street address, postcode and town on separate lines.',
'phone' => 'Phone',
'email' => 'Email',
],
'save' => 'Save',
'saved' => 'Company details saved.',
'errors' => [
'name' => 'Enter the company name (at most 255 characters).',
'business_id' => 'Enter a valid business ID, e.g. 1234567-8.',
'menu_name' => 'The menu name may be at most 100 characters.',
'address' => 'The address may be at most 500 characters.',
'phone' => 'The phone number may be at most 50 characters.',
'email' => 'Enter a valid email address.',
],
];