translation
Qumra Engine supports a simple and flexible localization system using JSON language files.
Each theme can define its own translation keys inside the project/locales/ folder.
📁 Adding Translation Keys
Add your translation keys inside the language file:
project/locales/en.json
Example:
{
"edit_period_ended": "The period to edit the review has ended",
"delete_period_ended": "The period to delete the review has ended",
"days_since_added": "days since it was added"
}
You may add the same keys to other language files (e.g. ar.json).
Qumra Engine will automatically load the correct translation based on the active store language.
🔧 Using Translation Keys in Templates
Translation keys can be accessed inside templates using the t() helper:
{{ t("delete_period_ended") }}
Full example:
<p>{{ t("edit_period_ended") }}</p>
<p>{{ t("delete_period_ended") }}</p>
<p>5 {{ t("days_since_added") }}</p>