Appearance
Translations and language workflow ​
OCP UI language support is implemented in src/OrishaPlatform.UI.App with English (en) as the default and fallback locale.
Currently supported locales:
en(default and fallback)svfrnles
Runtime behavior ​
- Users can switch language from the user menu in the UI.
- The selected locale is saved in the
ocp-localecookie. - Invalid or unknown locale values fall back to English.
- Backend API requests include the selected language through the
Accept-Languageheader.
Translation source and generated assets ​
- Source-of-truth translation files:
src/OrishaPlatform.UI.App/app/i18n/po/*.po - Generated runtime message files:
src/OrishaPlatform.UI.App/i18n/locales/generated/*.json
The generated JSON files are consumed by Nuxt i18n at runtime.
Translator/developer workflow (PO-based) ​
- Update translations in the appropriate
*.pofile. - Generate runtime locale assets:
bash
cd src/OrishaPlatform.UI.App
npm run i18n:generate- Validate with build/tests before merge.
Adding a new language ​
- Add a new PO file in
app/i18n/po. - Register the locale in
nuxt.config.ts(i18n.locales). - Update
app/utils/app-locale.ts(appLocalesandtoAcceptLanguagemapping). - Run
npm run i18n:generate.
No structural code changes are needed beyond locale registration and translations.