Skip to content

Commit fb1ac94

Browse files
committed
Enhance internationalization support by adding Hindi and Marathi locales, updating middleware for i18n routing, and implementing automated translation for content. Ensure only English content is authored directly, with machine translations managed via GitHub Actions.
1 parent c65bfa7 commit fb1ac94

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

devcon/CLAUDE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ Recoil for global state (`src/state/main.ts`). React Context for Web3Modal/AppKi
6060

6161
### Internationalization
6262

63-
Locales: `default`, `en`, `es`. Middleware handles i18n routing.
63+
Locales: `default`, `en`, `hi`, `mr` (next.config.js). Middleware handles i18n routing.
64+
65+
- Intl strings live in `content/<locale>/intl/*.json`, imported and registered per-namespace in `src/utils/intl.ts`. `getMessages(locale)` deep-merges the locale bundle **on top of `en`**, so missing hi/mr files or keys automatically fall back to English.
66+
- **Only author content in `content/en/`.** Never hand-create or hand-edit `hi`/`mr` files: a GitHub Action (`.github/workflows/devcon-translate.yml`, root repo) runs on every push to `main` touching `devcon/content/en/**` and machine-translates changed files to Hindi and Marathi via `pnpm translate-content`, committing the results. Hand-made hi/mr files get overwritten by it, and until then they *override* the en fallback (risking stale copy).
67+
- `content/.manifest.json` tracks source-file hashes so only changed en files are re-translated; don't edit it manually.
6468

6569
## Code Style
6670

0 commit comments

Comments
 (0)