Skip to content

Multi-Language Support ​

The API supports multiple locales. Currently available: el (Greek), en (English).

Locale Prefix ​

Prepend the locale code to any REST route:

GET /el/rest/product/product       # Greek context
GET /en/rest/product/product       # English context
GET /rest/product/product          # Default locale

When a locale prefix is present, translation fields in the response are resolved to that locale's value directly.

Default Locale Behavior ​

When no locale prefix is specified in the URL (e.g., GET /rest/product/product instead of GET /el/rest/product/product), the system uses the configured default locale. This is typically set in application configuration and determines which language's translations are resolved into the main response fields.

Translations Relation ​

Most entities with translatable fields have a translations relation. Load it with ?with=translations to get all available translations:

json
{
  "id": 1,
  "name": "Widget",
  "translations": [
    { "lang": "el", "name": "..." },
    { "lang": "en", "name": "Widget" }
  ]
}

MUI Resources ​

In admin/backend context, multi-language entities expose MUI (Multi-language UI) variants via dedicated endpoints or relation includes. These return a compact structure with all translatable fields grouped by language, designed for admin edit forms.

MUI resources provide a compact, admin-edit-friendly structure where all translatable fields are grouped by language rather than returned as a flat array of translation rows. This makes it straightforward to populate multi-tab or multi-column language editors:

json
{
  "id": 1,
  "mui": {
    "el": {
      "name": "...",
      "description": "...",
      "slug": "..."
    },
    "en": {
      "name": "Widget",
      "description": "A fine widget",
      "slug": "widget"
    }
  }
}

This grouped-by-language format contrasts with the standard translations relation (which returns an array of per-language objects) and is optimized for admin interfaces that need to display and edit all languages simultaneously.

Filtering by Translation Fields ​

Use the locale suffix in filter keys:

?filter[name.el]=...
?filter[slug.en]=my-product

Sorting by Translation Fields ​

Similarly, append the locale to sort keys:

?sort=name.el
?sort=-name.en