0

I am using Sitecore 9.0.1 with SXA 1.7. We have a requirement that droplist should show its values in chinese language. But when the value for the item is choosen it is not showing its values in chinese language in the page. We are not able to change the item name also since it is in chinese.

This is the field where it is showing the display names of the droplist items

enter image description here

This is the screenshot of this below item in Page where it is taking the english value only.

enter image description here

Below is the screenshot of droplist items.

enter image description here

Can anyone please suggest how can we acheive this.

Thanks

1
  • Can you show us how you are displaying the data? I think your problem might be there...
    – Gatogordo
    Commented Mar 31, 2021 at 9:42

1 Answer 1

0

The problem is that the droplist field type is always storing the item names, not their corresponding display names. You can verify this by looking at the field's Raw Values, you will see that the value will be the same for both languages.

I would suggest to change this to a droplink field instead as that will store the item's ID instead. Afterwards you can show the selected item's title field from that language. One solution would be to use a rendering variant reference item, which lets you display fields from a referenced item. You would have something like this:

enter image description here

You can take a look at the sitecore doc https://doc.sitecore.com/developers/sxa/18/sitecore-experience-accelerator/en/walkthrough--using-the-rendering-variant-reference-item-to-display-fields-from-a-linked-item.html which describes step by step how to create the rendering variant reference item and render the fields.

4
  • I tried this but it didnt work it is showing Item ID not the value
    – Vinaya
    Commented Mar 31, 2021 at 9:09
  • Yes, but you need to get the item based on that ID and then read it's title field. Either through custom code or reference item example Commented Mar 31, 2021 at 9:53
  • I created the reference item varient and gave the field name to be shown but it didn't work @Cristi Vulturar
    – Vinaya
    Commented Apr 5, 2021 at 5:14
  • Have you created a Pass through field aswell? You can also take a look at the video which shows step by step how to use the rendering variant reference item youtube.com/… Commented Apr 5, 2021 at 6:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.