Languages
How Kinora runs in English and Arabic, how to change any text, and what to change to add a language.
For the Full Stack package
The languages that ship
English and Arabic, in both apps. Arabic lays the whole dashboard out right to left, with its own font.
| App | English | Arabic |
|---|---|---|
| Dashboard | /en/… | /ar/… |
| API | Accept-Language: en | Accept-Language: ar |
English is the default. Catalogue content (exercises, workouts, programs, dishes, groups, events, challenges, badges) is stored with its name and description in both languages, entered side by side on the Content screens.
How the language is chosen
- The language is the first part of the address. A path without one goes to
/en; the browser's language is not detected. - The language switcher swaps that part of the address and keeps the page.
- The direction is set before the first paint, so an Arabic page never flashes left to right.
- The dashboard sends the page's language to the API in
Accept-Language, so its messages come back in the same language.
Change a text
Every visible word lives in messages/<namespace>/en.json and ar.json, in the dashboard's folder. Change the value, keep the key, and change it in both files.
| Namespace | What it holds |
|---|---|
ai-assistant | The assistant's page |
auth | Sign-in, registration and password pages |
common | The shared components' words: tables, filters, uploads, the search |
dashboard | Every dashboard page and the notifications, with a folder per section (activity, workouts, nutrition, clients, content, settings and the rest) |
demo-credentials | The public demo's panel where a visitor adds their own AI key |
layouts | The navbar, the sidebar's chrome and the sample-data notice |
- A key missing from
ar.jsonshows as a missing-message error on the Arabic side, so keep the two files in step. - The sidebar labels are the exception: they are written in English and Arabic in
src/layouts/dashboard/sidebar/config/navigationData.ts, which also feeds the search. - Text inside
{curly}braces is filled in by the app, such as{count}or{name}. Keep those words as they are in both languages. - Notifications are stored as what happened, never as a sentence, and the dashboard writes the words from its own message files. A new language for them is a translation, not an API change.
The dashboard's own Arabic labels
When you write about Kinora in Arabic, use the labels its screens show:
| English | Arabic | Who sees it |
|---|---|---|
Dashboard | لوحة التحكم | Everyone |
AI Assistant | المساعد الذكي | Everyone |
Activity | النشاط | Members |
Workouts | التمارين | Members |
Exercise Library | مكتبة التمارين | Members |
Nutrition | التغذية | Members |
Meal Planner | مخطط الوجبات | Members |
Sleep | النوم | Members |
Health | الصحة | Members |
Progress | التقدم | Members |
Progress Photos | صور التقدم | Members |
Community | المجتمع | Members |
My Clients | عملائي | Head Coach and Personal Trainers |
Gym | النادي | Staff |
Content | المحتوى | Staff |
Coaches | المدربون | Staff |
Coach Roles | أدوار المدربين | Staff |
Settings | الإعدادات | Everyone |
Sign In | تسجيل الدخول | The sign-in page |
What the API translates
- Error messages and the
messageof a successful write come back in the language of theAccept-Languageheader.ar-SAcounts as Arabic; any language the API does not have falls back to English. - Its texts are JSON files in
back-end/src/i18n/translations/en/andar/, one per area:auth,coach,common,roles,settings,users. - Content stored in both languages comes back as
{ "en": "…", "ar": "…" }, and the dashboard picks one.
Add a language to the dashboard
The two languages are written into several files, so adding a third touches each of them. Paths are inside dashboard/.
Add the language code
Add it to the locale lists in
src/config/i18n.ts,src/proxy.ts,src/app/[locale]/layout.tsxandsrc/components/LanguageSwitcher.tsx.Translate the messages
Add a
<code>.jsonbeside everyen.jsonundermessages/, including the folders insidemessages/dashboard/.Translate the sidebar and the brand
Add your language to each label in
src/layouts/dashboard/sidebar/config/navigationData.ts, and to the texts insrc/config/brand.config.ts.Set the direction
For a right-to-left language, add it to
RTL_LOCALESinsrc/app/layout.tsxand tosrc/hooks/locale/useDirection.ts.
Catalogue content is stored in English and Arabic only. A third language also needs the API's content fields and the Content forms to carry it.
Add a language to the API
Add the language code
Add it to
supportedLocalesinback-end/src/i18n/i18n.service.ts.Translate the messages
Copy
back-end/src/i18n/translations/en/to a folder named after the code and translate the values. A key you leave out falls back to English.