0

We have a Sitecore 10.3 SXA JSS site with a React frontend utilizing a headless proxy. The default language, as specified in the JSS app's Site Grouping item's language field, is en-CA. However, a new business requirement dictates that the site context language should dynamically switch to fr-CA based on the user's location (X location). While we can successfully fetch the user's language, we're unable to programmatically change the context language within the SXA site because the Site Grouping item always defaults to en-CA. Our challenge is to override the default language setting and change the context language based on user location using code within the SXA site.

Can we change context language of SXA site programmatically without touching the language mentioned on site grouping item ?

2
  • If it works locally, but not on the upper environment, then your patch probably didn't get deployed correctly.
    – Richard Seal
    Commented Mar 22 at 19:31
  • In my local I'm using connected mode without SXA Site grouping item whereas in upper env , I'm using headless mode with SXA and Site Grouping Item Commented Mar 22 at 20:52

0

Your Answer

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

Browse other questions tagged or ask your own question.