i18n Migration Plan
Scope
Enable multilingual behavior for existing single-language deployments with safe rollback.
Rollout Steps
- Deploy backend code with
nestjs-i18nand new locale files. - Run DB migration:
users.preferred_languageorganisations.default_language
- Backfill
preferred_languagefrom existingusers.language. - Deploy frontend with language switcher and i18n runtime.
- Enable feature flag (if used) for multilingual UI.
- Validate production with smoke tests:
- login
- profile language update
- notification/email language resolution
Backward Compatibility
- Existing
users.languageremains populated and is mirrored frompreferred_language. - Missing translation keys fall back to English.
Rollback
- Disable frontend language switcher feature flag.
- Redeploy previous frontend bundle.
- Redeploy previous backend image.
- Keep DB columns in place (non-breaking), or run down migration if required.
Verification Checklist
PATCH /api/users/me/languagereturns updated language.<html lang>updates after switch.- API error/success messages remain valid.
- Email channel still sends notifications with fallback templates.