Translation Keys
Many labels in a portal come from configuration rather than from the portal engine itself: the name of a data pool, the attributes offered as filters and sort options, the titles and field names of a custom layout, the options of a select field. The portal engine looks each of these up as a translation key, so they can be translated like every other text of the portal.
A filter on the attribute manufacturer, for example, is labelled with the translation of
portal-engine.filter-label.manufacturer, and a layout panel titled Basedata with the translation of
portal-engine.data-object.Basedata.
All of these keys live in the translation domain portal_engine_frontend. Open Translations in the Pimcore
backend and select that domain to see every key of the portal.
How a Key Is Built
Every key starts with portal-engine.. Most keys continue with a prefix that says where the label is used,
followed by the label as entered in the configuration:
portal-engine.<prefix>.<label>
Field titles are the exception: they have no prefix, the title follows portal-engine. directly. A field titled
Texts Available is looked up as portal-engine.Texts Available.
In the tables below, the placeholders in <...> stand for the text as entered in your configuration.
Keys
The name of every key is derived from your configuration, you never choose it. Open Translations in the Pimcore
backend, filter by the prefix of the key, for example portal-engine.filter-label., and fill in the translations.
Listing
| Key | Used for |
|---|---|
portal-engine.filter-label.<attribute> | Labels of the filters of a data pool |
portal-engine.filter-option.<attribute>.<value> | Values offered by a filter. Not used by date filters, by country and language filters, or by select and multiselect filters of data object pools: those show the formatted date, the country or language name, or the option text instead |
portal-engine.sort-label.<attribute> asc / ... desc | Sort options of a data pool. The space before asc / desc is part of the key. The entry labelled Default is portal-engine.sort-label.default |
portal-engine.list-label.<attribute> | Grid configuration attributes, shown as column headers in the list view |
Detail Page
| Key | Used for |
|---|---|
portal-engine.<field title> | Field titles, as entered in the class definition or the metadata definition |
portal-engine.data-object.<layout title> | Titles of panels, tabs, field sets, blocks and classification store groups in a detail page layout or a metadata definition |
portal-engine.data-object.<field name>.<option label> | Option labels of select, multiselect, country and language fields. Target group names are shown as configured |
portal-engine.asset.<attribute> | General attributes and shortcut downloads on the asset detail page |
portal-engine.workflow-transition.<transition label> | Workflow transitions and global actions |
portal-engine.workflow-label.<workflow label> | Workflow names, shown as group headers when more than one workflow offers actions |
A field titled Manufacturer in the class definition is translated by the key portal-engine.Manufacturer, a
layout panel titled Basedata by portal-engine.data-object.Basedata. Layout titles and select options share the
data-object. prefix and differ only in what follows it. For a select option the last part is the option's display
text as entered in the class definition, not the value stored on the object: an option entered as Couple of days
with the value couple-days is translated by portal-engine.data-object.<field name>.Couple of days.
Downloads and Cart
| Key | Used for |
|---|---|
portal-engine.download-type.<name> | Download types in download dialogs and the download cart: asset, the class name of a data object data pool, or the attribute of a field download |
portal-engine.download-format.<name> | Download formats in download dialogs and the download cart: the name of an exporter, e.g. Portal Engine CSV, and, in the download cart only, the name of a thumbnail |
portal-engine.thumbnail.<thumbnail name> | Available download thumbnails of a data pool in the download dialogs, plus original and custom. jpeg and png label the file formats of a custom download. The download cart looks the same thumbnail name up as portal-engine.download-format.<thumbnail name> instead, so add both keys to translate a thumbnail everywhere |
portal-engine.data-pool.<data pool name> | Data pool names in the download cart |
Collections and Public Shares
| Key | Used for |
|---|---|
portal-engine.collection-tab-label.<data pool name> | Data pool tabs on a collection |
portal-engine.public-share-tab-label.<data pool name> | Data pool tabs on a public share |
Content Pages
| Key | Used for |
|---|---|
portal-engine.statistic-name.<statistic name> | Names of statistics in the statistics area brick |
What Is Shown Without a Translation
If a key does not exist, or exists with an empty translation, the portal shows the label itself: a filter on
manufacturer is labelled manufacturer, a layout panel titled Basedata is titled Basedata. A portal therefore
works without any of these keys; translations only refine what is shown.
For the labels of the detail pages, the download cart and the download dialogs, a language without a translation
of its own falls back to the main language of its region (de for de_AT) and then to English, before the label
itself is shown.
Good to Know
- Keys are case-sensitive and may not be longer than 190 characters including the
portal-engine.prefix. - The portal engine ships its own texts in
src/Resources/translations/portal_engine_frontend.<language>.yaml. A translation entered in the Pimcore backend takes precedence over a shipped one. - Renaming a data pool, an attribute, a layout title or a field title changes the label part of its key. Translations for the old name are no longer used and have to be entered again for the new key.
- A title that contains a
:but no space, such asWidth:Heightor16:9, cannot be translated this way, because the colon is read as a separator inside the key. Such a title is shown as entered. A.in a title, or a:in a title that also contains a space, is fine. Select option labels are always looked up as a whole. - On the asset detail page, the tabs of the metadata card are named after the metadata definitions. These names cannot be translated and appear as configured.