1

I am working on a multilingual site in Sitecore and I need to filter search results by current language.

I am using a search scope and I would like to have different versions of a search scope, one for each language.

enter image description here

In the english version of the scope, I added +language:en to the Scope Query field. Then I switched to italian version of the scope and changed the Scope Query field to +language:italian_italy.

It turns out that the english version of the scope was overwritten too, so in the Scope Query of the english version now I have +language:italian_italy! So currently I am not able to have different Scope query field values for different languages' versions of the same search scope item.

Am I missing something? Is there a way to make it work or will I be forced to duplicate the search scope instead of using versions?

I am using Sitecore SXA XM 10.2

1 Answer 1

1

You can see that the title of the field is

Scope query [shared]

Shared field means that its value is shared across all language versions. You cannot select different values for EN and for IT versions of that page.

What you can do though is using predefined SXA token CurrentLanguage in Query Builder as explained in Sitecore documentation:

https://doc.sitecore.com/xp/en/users/sxa/101/sitecore-experience-accelerator/extend-search.html

1
  • I see! It's working! And it's even simpler than what I initially figured, thanks! Jul 13, 2023 at 10:23

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.