Is it possible to localize DataListItem Name and Description? #304
Replies: 1 comment
-
Hi @Nikkelmann. There's nothing in the Data List code that will detect and localize the keys. The reason being that each of the data-sources are responsible for their own data-items. With the Enum data-source, the optional Currently, the potential options are to either roll-your-own custom data-source that injects Umbraco's Now since you've raised this question, I would be open to adding this feature to the Enum data-source, I'm thinking along the lines of introducing some kind of |
Beta Was this translation helpful? Give feedback.
-
In the backoffice it is possible to localize properties by prepending the localization key with a hash sign, eg. "#area_key".
However, this does not seem to work with the DataListItems, nor does the "area/key" format (https://docs.umbraco.com/umbraco-cms/extending/language-files#using-the-language-keys).
Is there a way to get the DataListItem Name and Description values localized?
The setup I've tried so far
The property on the doctype with the added localization keys:
The rendered form in the backoffice, where the property is translated, but not the names of the values:
The enum with the DataListItem, where I've tried with three different localization key formats:
Note: I've also tried with @ in front of the key.
The DataType setup:
The translations in
/config/lang/{language}.user.xml
:Beta Was this translation helpful? Give feedback.
All reactions