2

Does SXA have out of the box support (i.e. some API method to call) for Dictionary text stored at a per-site level? If so, how is this enabled?

2

1 Answer 1

3

In Sitecore 9.3 when you create a new site you will find a Dictionary node in it. This works like the ootb Sitecore dictionary and includes fallback to more generic dictionaries (you can set which ones).

enter image description here

Reading values from this dictionary can be done with Scriban with the sc_translate function. More info here: https://ggullentops.blogspot.com/2019/11/sitecore-sxa-93-scriban.html

If you are not on 9.3, you could use the solution Kamruz mentioned or go custom.. For an older project I created a custom variant that could handle translations. Creating the variant can be found here: https://ggullentops.blogspot.com/2019/04/sitecore-sxa-custom-rendering-variant-translation.html. You do need to link this variant to a translation mechanism - in our case that was custom too, but out of scope for that blog post. You could link it to any code that can translate labels though.

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.