# Phase 3: Localization (EN/RU) **Status:** ⬜ Not Started **Parent plan:** [PLAN.md](./PLAN.md) **Domain:** fullstack ## Objective Add internationalization (i18n) support with English and Russian locales. All UI strings should be translatable. Users can switch language in settings or header. ## Tasks - [ ] Task 1: Install `paraglide-sveltekit` (or `svelte-i18n`) — choose the best Svelte 5 compatible i18n library - [ ] Task 2: Create locale files: `src/lib/i18n/en.json` and `src/lib/i18n/ru.json` - [ ] Task 3: Create `src/lib/i18n/index.ts` — i18n setup, locale detection, switcher - [ ] Task 4: Create `src/lib/components/layout/LanguageSwitcher.svelte` — language toggle (EN/RU) in header - [ ] Task 5: Extract all hardcoded strings from layout components (Sidebar, Header, MainLayout) - [ ] Task 6: Extract all hardcoded strings from auth pages (login, register, logout) - [ ] Task 7: Extract all hardcoded strings from board/section/widget components - [ ] Task 8: Extract all hardcoded strings from app components (AppCard, AppForm, AppIconPicker, etc.) - [ ] Task 9: Extract all hardcoded strings from admin pages (users, groups, settings) - [ ] Task 10: Extract all hardcoded strings from search components - [ ] Task 11: Add locale preference to user settings (stored in localStorage + optional DB field) - [ ] Task 12: Add language setting to admin SystemSettings (default locale) - [ ] Task 13: Translate all strings to Russian ## Files to Modify/Create - `src/lib/i18n/en.json` — NEW - `src/lib/i18n/ru.json` — NEW - `src/lib/i18n/index.ts` — NEW - `src/lib/components/layout/LanguageSwitcher.svelte` — NEW - `src/lib/components/layout/Header.svelte` — MODIFY - `src/routes/login/+page.svelte` — MODIFY - `src/routes/register/+page.svelte` — MODIFY - `src/routes/boards/*.svelte` — MODIFY - `src/routes/apps/+page.svelte` — MODIFY - `src/routes/admin/**/*.svelte` — MODIFY - `src/lib/components/**/*.svelte` — MODIFY (all UI components) ## Acceptance Criteria - All user-visible strings are translatable (no hardcoded text in components) - English and Russian translations are complete - Language switcher in the header toggles between EN/RU - Locale preference persists across sessions (localStorage) - Default locale is configurable in admin settings - Date/number formatting respects locale ## Notes - Use a flat key structure: `{ "nav.boards": "Boards", "nav.apps": "Apps", ... }` - Keep translation keys semantic and grouped by feature - Validation error messages from Zod should also be translatable - ⚠️ Big Bang: string extraction touches many files ## Review Checklist - [ ] All tasks completed - [ ] Code follows project conventions - [ ] No unintended side effects - [ ] Build passes - [ ] Tests pass (new + existing) ## Handoff to Next Phase