feat(i18n): add multi-language support (en/zh) across app and server

Implement useLocale composable and shared translation dictionaries
Translate public pages, booking flow, and receipt views
Store booking locale to send localized WhatsApp notifications
This commit is contained in:
2026-05-08 15:31:44 +08:00
parent b05cfd2c0e
commit 1318e766d5
14 changed files with 789 additions and 209 deletions

View File

@@ -272,6 +272,7 @@ async function initializeDatabase() {
event_id text references dinner_events(id) on delete restrict,
customer_name text not null,
customer_phone text not null,
locale text not null default 'en',
booking_mode_id text references booking_modes(id) on delete restrict,
booking_mode text not null,
quantity integer not null check (quantity >= 1),
@@ -316,6 +317,11 @@ async function initializeDatabase() {
add column if not exists remark text
`
await sql`
alter table bookings
add column if not exists locale text not null default 'en'
`
await sql`
create unique index if not exists bookings_receipt_token_idx
on bookings (receipt_token)