3.6 KiB
3.6 KiB
phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, patterns-established, duration, completed
| phase | plan | subsystem | tags | requires | provides | affects | tech-stack | key-files | key-decisions | patterns-established | duration | completed | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 15-locale-detection-routing | 01 | i18n |
|
|
|
|
|
|
|
|
2min | 2026-02-02 |
Phase 15 Plan 01: Locale Preference Infrastructure Summary
LocalePicker extension with manual selection cookie (1-year) and user DB sync, plus URL prefix cookie setting in routes.php
Performance
- Duration: 2 min
- Started: 2026-02-02T01:01:04Z
- Completed: 2026-02-02T01:02:55Z
- Tasks: 3
- Files modified: 2
Accomplishments
- LocalePicker component extended to set
locale_manually_setcookie on manual language switch - Logged-in users' locale preference saved to database (
preferred_localefield) on switch - URL prefix visits (/pl/, /de/) now set manual selection cookie preventing browser detection override
- Verified LocaleMiddleware reads the same cookie name correctly
Task Commits
Each task was committed atomically:
- Task 1: Extend LocalePicker to set cookie and sync user preference -
4a04780(feat) [quotify submodule] - Task 2: Set cookie on URL prefix detection in routes.php -
c389de1(feat) [translate submodule] - Task 3: Verify middleware reads the cookie correctly - verification only, no commit required
Submodule update: 382b7a6 (chore: update submodule references)
Files Created/Modified
plugins/golem15/quotify/Plugin.php- Added extendLocalePicker() method with Cookie::queue and Auth user syncplugins/golem15/translate/routes.php- Added cookie setting after loadLocaleFromRequest() succeeds
Decisions Made
- WinterCMS extension pattern: Extended LocalePicker component in Quotify Plugin.php rather than modifying core Translate plugin classes (preserves plugin isolation)
- Config-driven cookie settings: Used
golem15.translate::browserDetection.manualSelectionCookieandmanualSelectionExpiryconfig values for consistency across all cookie operations
Deviations from Plan
None - plan executed exactly as written.
Issues Encountered
None - all tasks completed successfully.
User Setup Required
None - no external service configuration required.
Next Phase Readiness
- Locale preference infrastructure complete
- Manual selections now persist via cookie (1-year expiry)
- Logged-in users' preferences sync to database
- Browser detection correctly skipped when manual selection cookie present
- Ready for Phase 15 Plan 02 (if any) or Phase 16 (Content Localization)
Phase: 15-locale-detection-routing Completed: 2026-02-02