Translations
All texts your users see belong into the translation files - German and English together.
File
Content
| English texts of all apps |
| German texts of all apps |
Group your texts under app.{processId}:
JSON
{
"app": {
"purchase": {
"process": {
"name": "Purchase Request",
"description": "Request goods and services",
"widgetDescription": "Start a new purchase request"
},
"ui": {
"request": {
"panelTitle": "Request",
"typ": "Request type",
"description": "Reason"
}
}
}
}
}
Use them with the namespace purchase, which holds the texts of all apps:
TSX
import { useTranslation } from "react-i18next";
const { t } = useTranslation("purchase");
<EccPageHeader headline={t("app.purchase.process.name")} text={t("app.purchase.process.description")} />
<EccPanel title={t("app.purchase.ui.request.panelTitle")}>
<EccText fieldLabel={t("app.purchase.ui.request.type")} value="purchase.requestType" data={draft} valueOut editable />
</EccPanel>
Ecc components in this example: EccPanel, EccText - how to use them is described in UI Components. Widgets in this example: EccPageHeader.
The user’s language is taken from the browser and falls back to English. Process data (e.g. option labels coming from the backend) is not translated automatically.
Was this section helpful?
On this page
- Translations