Commit Graph

2 Commits

Author SHA1 Message Date
Unchained
03becb6ce7 refactor: make locale handling truly centralized and robust
- Added getPathWithoutLocale() and buildLocalePath() helpers to locales.ts
- Updated Header to use centralized helpers instead of hardcoded regex
- Updated middleware to use SUPPORTED_LOCALES in matcher config
- Updated LocaleProvider to use isValidLocale() instead of hardcoded array

To add a new language now, only update:
1. SUPPORTED_LOCALES in locales.ts
2. LOCALE_CONFIG entry with label, flag, saleorLocale
3. Add translation keys to all message files

All routing now uses centralized constants - no more hardcoded locale lists.
2026-03-24 11:52:22 +02:00
Neo
cbb49ba64f Working state: Serbian at root (/), English at /en, proper i18n structure 2026-03-04 08:48:37 +00:00