Hooky17
Hooky17

Reputation: 47

Kentico 11 inconsistent culture selection and redirection

We have a website that runs primarily on a '.co.uk' domain. We also have an Irish version of the site that sits under the domain alias '.ie' - periodically on page load the culture doesn't match the domain. For instance, quite often when loading the .ie version of the site we can see in the code that the culture is coming in as 'en-GB' which is incorrect. This is inconsistent behaviour and there seems to be no pattern to it replicating it.

Applying the Force domain culture setting seems to prevent the issue HOWEVER when we do so the website redirects any pages that don't have translated versions rather than 'combining the default culture content'.

How can we resolve this issue so that the culture is strictly maintained by domain (en_GB on .co.uk and en_IE on .ie) as well as to inherit the content from the default culture where pages aren't translated.

Thanks in advance, Luke

Upvotes: 0

Views: 205

Answers (1)

Trevor F
Trevor F

Reputation: 1437

One of two possibilities.

One is that there is are 2 culture codes to pull from. The user's preferred Culture (in this case, the 'en-IE') and the current page's culture (which can very depending on if the page is translated in the user's preferred culture code).

Depending on how you are pulling in the culture, you may be using the later vs. the former and that's why you are seeing the issues.

Another thing is your Culture Selector, you can set it in the culture selector to only show the current page's cultures, or all the site cultures, if the issue is your selector then check the Language Data Source and see if that is the issue (should be a checkbox).

Otherwise the last place to check is if you have any URL aliases for pages, there is a culture selection on that url alias (can be set to any culture), if the culture is set (by default it is) when that alias is used it will switch the user's culture.

if these don't help you, can you provide some screen shots on what you are seeing and what you are looking to have happen?

Upvotes: 2

Related Questions