Reputation: 67
If there is no language specified in the redirected URL it is taking the default language and showing the page in the same language.
Eg. I changed the Language to "Fr" and redirecting the to a different page (Redirecting URL is not having any language specifiers). Instead of showing the page in French language it is showing it in english ("en" is my default language).
Upvotes: 0
Views: 485
Reputation: 67
app.module.ts
context: {
language: ['en','ar'],
baseSite: ['my-base-site'],
urlParameters: ['language']
}
I have some links which will redirect to the different pages.
E.g <a [href]="data.urlLink">Click Here
Eventhough I changed language as "ar" on redirecting to the different page by clicking the link, it is redirecting to the correct page but with the language default language ("en" in my case).
Also I observed the following api call in network tab.
https://site-name/occ/v2/base-site/users/current?lang=en
For one of my friend it is working fine with the same code base. The only difference I found is the lang in api call. This is what the exact call
https://site-name/occ/v2/base-site/users/current?lang=ar
Upvotes: 0
Reputation: 1221
It sounds like a misconfiguration of the Spartacus context
config, see docs:
Honestly, I'm having hard time understanding your question/problem. Can you rephrase it please? Kindly please provide:
context
configuration? (or in case it's automatic-context-config: what languages and Url Encoding Attributes you have configured for your basesite in your CMS?)Thanks in advance for your additional input!
Upvotes: 1