Languages
How the website and the dashboard run in English and Arabic, how to change any text, what the API translates, and what to change to add a language.
For the Full Stack package
The languages that ship
English and Arabic, in all three apps. Arabic lays the whole interface out right to left, with its own typefaces, and the product name stays Northstack in Latin letters in both languages. Prices on the website are written the same way in both, the dollar sign first in Latin digits.
| App | English | Arabic |
|---|---|---|
| Website | /en/… | /ar/… |
| Dashboard | /en/… | /ar/… |
| API | Accept-Language: en | Accept-Language: ar |
English is the default. French, Spanish and other languages are not included; the sections below say what adding one takes.
How the language is chosen
- The language is the first part of the address. The Language menu swaps it and keeps the page.
- The website: a path without a language is sent by next-intl to the visitor's earlier choice or their browser's language when it is English or Arabic, and to
/enotherwise. The sitemap lists every page in both languages, each with its alternate. - The dashboard: a path without a language opens in the language the dashboard last served in that browser (the
NEXT_LOCALEcookie), English otherwise, and the bare address opens/<language>/dashboard. Every request it makes sends the page's language to the API asAccept-Language. - A password reset link opens the dashboard in the language the reset was asked for, and the licence checkout's return pages open in the language the buyer checked out in.
Change a text
Every visible word lives in messages/<namespace>/en.json and ar.json, in each frontend's folder. Change the value, keep the key, and change it in both files.
| App | Namespaces |
|---|---|
| Website | layout, home, pricing, checkout, docs, blog, changelog, contact, legal, sampleData. The documentation, journal and changelog texts are in src/content/docs/, src/content/journal/ and src/content/changelog/, one en.json and one ar.json each. |
| Dashboard | ai-assistant, auth, common, dashboard (with a folder per area: activity, billing, overview, platform, projects, roles, settings with adminmanagement, adminroles, appsettings, profile and security, team, ui-component, users), invitation, layouts, metadata (the tab titles), onboarding |
- A key missing from
ar.jsonshows as a missing message on the Arabic side, so keep the two files in step. - Text inside
{curly}braces is filled in by the app, such as{count}or{license}. Keep those words as they are in both languages, and keep the tags inside a message, such as<code>or<card>, around their text.
Text the workspace stores in both languages
- A project's name and description and a task's title and description are kept per language, as
translations: { en, ar }. The English name or title is required; the Arabic one is optional, and the Arabic dashboard shows the English text wherever the Arabic is empty. The seed fills both for every sample project and task. - The platform's permissions and settings carry their labels and descriptions in both languages too.
- The workspace's Language in Settings is the language of its emails for anyone who has chosen no language of their own. The language of the screens is always the one in the address.
- The AI assistant answers in the language of the page it is asked from, unless the person writes in another one.
What the API translates
- Error messages come back in the language of the
Accept-Languageheader, and so does themessageof a successful sign-in, profile, staff, role or settings change; other answers carry a fixed code (such ascheckout_started) that the frontend words itself.ar-SAcounts as Arabic; any language the API does not have falls back to English. - Its own texts are JSON files in
back-end/src/i18n/translations/en/andar/, one per area:admin,auth,common,mail,project,roles,settings,tasks,users. - Projects and tasks come back with both languages, as
{ "en": {…}, "ar": {…} }, and the dashboard picks one. - The emails about a workspace (invitations, the weekly digest and the billing emails) are written from
mail.jsonin the recipient's language: their own choice, else the workspace's Language, else English (back-end/src/modules/mail/recipient-locale.ts). The password reset email (back-end/src/modules/auth/account.service.ts) and the licence receipt (back-end/src/modules/licenses/services/license-checkout.service.ts) are written in English, with links in the reader's language; translate them there if your customers need Arabic ones.
Add a language to the website
The two languages are written into a few files, so adding a third touches each of them. Paths are inside website/.
- Add the code to
localesinsrc/i18n/routing.ts. That list decides which addresses exist, what the sitemap lists and which language a path without one goes to. - Copy every
messages/<namespace>/en.jsonto a file named after the new code and translate the values.src/i18n/request.tsloads one file per namespace for each language, so none may be missing. - Do the same for
src/content/docs/,src/content/journal/andsrc/content/changelog/, and add the new file to thebyLocaletable in each folder'sindex.ts. - If the language is written right to left, extend the
dirline insrc/app/[locale]/layout.tsx, which only knowsar, and give it a typeface insrc/styles/fonts.css. - The checkout sends
enorarto the API (src/features/checkout/hooks/useCheckoutForm.ts), and the API accepts only those two. Searchsrc/for"ar"and handle the new code there too.
Add a language to the dashboard
- Add the code to
localesinsrc/config/i18n.tsand insrc/proxy.ts, and, if it is written right to left, toRTL_LOCALESinsrc/app/layout.tsxand the check insrc/hooks/locale/useDirection.ts. - Copy every
messages/**/en.jsonto a file named after the new code, and translate the values. - Search
src/for"ar": dates, charts, the assistant's widgets and a few settings choose between the two languages directly, andpickLocaleinsrc/lib/api/shared.tspicks a stored text in English or Arabic. - The project and task forms ask for English and Arabic. A third language in the stored texts also needs the API to accept it.
Add a language to the API
The API knows en and ar in supportedLocales in back-end/src/i18n/i18n.service.ts. Add the new code there, copy src/i18n/translations/en/ to a folder named after it, and translate the files. Stored texts are an { en, ar } pair, validated by the translations classes in src/modules/projects/dto/project.dto.ts and src/modules/tasks/dto/task.dto.ts, so a third language in the data is a change to those classes, the entities, the AI assistant's tools and the seed. The licence checkout accepts en or ar in src/modules/licenses/dto/start-license-checkout.dto.ts.