mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2026-01-02 03:25:26 +08:00
Initial GPT-5-high generated cursor rules
This commit is contained in:
10
.cursor/rules/i18n.mdc
Normal file
10
.cursor/rules/i18n.mdc
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
description: i18n usage and locale resolution
|
||||
---
|
||||
|
||||
### i18n
|
||||
|
||||
- Server locale: `getLocaleOnServer()` reads cookie or negotiates from headers: `[i18n/server.ts](mdc:i18n/server.ts)`.
|
||||
- Client locale: use `getLocaleOnClient()` / `setLocaleOnClient()` in `[i18n/client.ts](mdc:i18n/client.ts)`; uses `LOCALE_COOKIE_NAME` from config.
|
||||
- Place translations in `i18n/lang/**`. Keep keys synchronized across locales.
|
||||
- Render `<html lang>` using the resolved locale in `[app/layout.tsx](mdc:app/layout.tsx)`.
|
||||
Reference in New Issue
Block a user