mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-07 21:04:26 +08:00
Migrate from quetzal (deprecated) to i18next for internationalization.
JSON locale files are now the source of truth and can be directly edited.
Changes:
- Add i18next dependency
- Create editable JSON locale files for 13 languages
- Add generate-i18next-locales script to bundle translations
- Consolidate translation providers into single TranslationProvider
- Remove quetzal-based translation-provider-client
The translation API remains backward compatible:
- useTranslation() returns { t: (str, vars?) => string }
- StackProvider accepts lang and translationOverrides props
- Same supported locales: de-DE, en-US, es-419, es-ES, fr-CA, fr-FR,
it-IT, ja-JP, ko-KR, pt-BR, pt-PT, zh-CN, zh-TW
To edit translations:
1. Edit JSON files in packages/template/src/locales/
2. Run: pnpm run generate-i18next-locales
3. Run: pnpm run generate-sdks~
|
||
|---|---|---|
| .. | ||
| init-stack | ||
| js | ||
| react | ||
| stack | ||
| stack-sc | ||
| stack-shared | ||
| stack-ui | ||
| template | ||