Multiple Cultures

Suneel Jhangiani asked on May 20, 2018 18:09

I'd like to know how you guys would go about handling a site which should show English version pages to both US and UK users, yet have a different PerferredCultureCode so that Dates can be formatted correctly.

I know I could set Kentico to fallback to a default language, so could just set-up both cultures and not have users create any pages for one. However, that could become confusing if they are adding content for other languages.

Recent Answers


Jan Hermann answered on May 21, 2018 09:11

One of those two cultures has to be the default one, then you can add the other culture and not translate anything, so it takes the content from the default language. Then the transformation/macro would format the date according to selected culture.

0 votesVote for this answer Mark as a Correct answer

Suneel Jhangiani answered on May 21, 2018 13:40

Jan,

I get that, but how could I do this without showing English pages on a Spanish version of the site? Since the system will fallback to using the English default if a page has not yet been translated.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on May 21, 2018 14:56

Basically how localization works is you have a primary language (sorry, no way around that). And you can optionally show that default language if the current page is not translated into the user's preferred language.

So for your Spanish pages, if you do not wish it to show any page if not translated, then you need to go to settings - Content - Multilingual and uncheck "Combine with default culture"

That does mean that if the user is UK english and they are on a page that is only translated in US English, they will get a 404, but there's not much of a way around that.

The other 'option' if that really is the case, and i've done this with one of the sites that has mass regionality, is we only have 1 primary language culture (ex: us-EN for all english languages), and we have a separate custom "Region" attribute that can alter things like Measurements and Date formats, however it's a bit tedious to set that all up unless it's needed.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.