-
Notifications
You must be signed in to change notification settings - Fork 0
Internationalization
ABCrimson edited this page Jun 29, 2026
·
3 revisions
NextCalc Pro supports 8 languages via next-intl with the Next.js App Router.
| Code | Language | Status |
|---|---|---|
en |
English | Complete (1278 keys, source of truth) |
ru |
Russian | Mostly complete (1224 keys) |
es |
Spanish | Mostly complete (1224 keys) |
uk |
Ukrainian | Mostly complete (1224 keys) |
de |
German | Mostly complete (1224 keys) |
fr |
French | Mostly complete (1275 keys) |
ja |
Japanese | Mostly complete (1275 keys) |
zh |
Chinese (Simplified) | Mostly complete (1275 keys) |
Non-English locales retain some English fallbacks:
fr/ja/zhhold 1275 keys andde/es/ru/ukhold 1224 keys, versus 1278 inen.
apps/web/messages/
en.json # English (source of truth)
ru.json
es.json
uk.json
de.json
fr.json
ja.json
zh.json
All pages are under app/[locale]/, so URLs look like:
-
/en/plot-- English plot page -
/ru/matrix-- Russian matrix page -
/ja/algorithms-- Japanese algorithms page
apps/web/proxy.ts (Next.js 16 renamed middleware to proxy) detects the user's preferred locale and redirects accordingly.
import { useTranslations } from 'next-intl';
export default function MyPage() {
const t = useTranslations('myNamespace');
return <h1>{t('title')}</h1>;
}Keys are nested by namespace:
{
"calc": {
"title": "Scientific Calculator",
"history": "History",
"clear": "Clear"
},
"plots": {
"title": "Function Plotter",
"xAxis": "X Axis",
"yAxis": "Y Axis"
}
}- Create
apps/web/messages/{code}.json(copy structure fromen.json) - Translate all 1278 keys
- Add the locale code to
apps/web/i18n/routing.ts(locales are defined viadefineRouting) - Register the locale in the
messageImportsmap inapps/web/i18n/request.ts(e.g.{code}: () => import('../messages/{code}.json')) -- otherwise its messages won't load - Test:
pnpm devand navigate to/{code}/
A sample of the ~34 namespaces in en.json:
| Namespace | Keys | Description |
|---|---|---|
common |
50 | Shared UI labels (Submit, Cancel, etc.) |
nav |
57 | Navigation links |
calc |
56 | Calculator UI |
plots |
41 | Plotting interface |
algorithms |
130 | Algorithm pages |
settings |
70 | Settings page |
auth |
30 | Authentication UI |
forum |
63 | Forum interface |
NextCalc Pro v1.5.2 | Home | Getting Started | Architecture | API Reference | Deployment | GitHub | Release Notes | Live Demo
v1.5.2
🏠 NextCalc Pro
📦 Packages
🔧 Backend
🚀 Operations