I created a drop down data type with a number of choices from the dictionary. The system is configured to allow users with different languages to set up the content. When a user selects #option1 or #option2 in their language it is shown correctly in the other users language. However when I dispay the selected value ($currentPage/dropdownValue) I get #option1 with a hash instead of the translation to the site viewers language. OK that's ok I can use umbraco.library(getitemfromdictionary) but this doesn't work as it expects the # not to be supplied. So in the end I have written:
dictionary items in dropdown
I created a drop down data type with a number of choices from the dictionary. The system is configured to allow users with different languages to set up the content. When a user selects #option1 or #option2 in their language it is shown correctly in the other users language. However when I dispay the selected value ($currentPage/dropdownValue) I get #option1 with a hash instead of the translation to the site viewers language. OK that's ok I can use umbraco.library(getitemfromdictionary) but this doesn't work as it expects the # not to be supplied. So in the end I have written:
<xsl:value-of select="umbraco.library:GetDictionaryItem(umbraco.library:Replace(eventType, '#', ''))"/>
This feels wrong, but it works.
Hi John,
Can you explain how it is possible to add Dictionary items in Dropdown data type?
Thanks, Blagojce
I don't recall this exactly, but I think this is just XSLT for a normal drop down. It is not a data type.
I would expect dictionary values to work in a prevalue for a drop down data type. However I've never tried this and I don't know if they do.
is working on a reply...