Try our conversational search powered by Generative AI!

Mark Hall
Apr 17, 2020
  8155
(2 votes)

Fallback languages for catalog content

I recently had a partner ask me how they could get catalog content to work with fallback languages.  I figured this would be a tough task as been on the roadmap for awhile but tried to give this a shot.  I went looking into resuing the ContentLanguageSetting used in Cms but quickly found the it relies on content being stored in the content tables in the CMS.  The partner use case only needed to fallback to a neutral version if the country specific locale did not exist.  This alllowed me to tackle using code.  

Here is a gist of the code that was used.

Please note the two Get overloads in FallbackLanguageSettingsHandler as this is waht determines the fallback and replacement languages.  Here you could read from config or elsewhere if you need to have more business rules around which languages to choose.  Also note you need to set the strictLanguageRouting="false" in episerver section.

Hopefully this helps someone else trying to do the same thing.

Apr 17, 2020

Comments

Please login to comment.
Latest blogs
The Experimentation Process

This blog is part of the series -   Unlocking the Power of Experimentation: A Marketer's Insight. Welcome back, to another insightful journey into...

Holly Quilter | May 16, 2024

Azure AI Language – Sentiment Analysis in Optimizely CMS

In the following article, I showcase how sentiment analysis, which is part of the Azure AI Language service, can be used to detect the sentiment of...

Anil Patel | May 15, 2024 | Syndicated blog

Optimizely Data Platform Visitor Groups now supports multiple instances

The module V2.0 now supports multiple Optimizely Data Platform instances, allowing personalized content based on real-time segments and profile dat...

Andrew Markham | May 15, 2024 | Syndicated blog

IP block for edit and admin in DXP

Why IP-blocking edit/admin? A hacker can try to guess user names and passwords to gain access to your site. This risk can be minimized in a couple ...

Daniel Ovaska | May 15, 2024

Do not upgrade to EPiServer.CMS.Core 12.21.4 without reading this!

Todays update of EPiServer.CMS.Core 12.21.4 alters default sort order in an unexpected way, when you are working with muligple languages and have...

Tomas Hensrud Gulla | May 14, 2024 | Syndicated blog

Upgrade Optimizely CMS From v11 to v12

Why Upgrade? There are many improvements implemented in version 12, but most importantly is that the whole framework is migrated from .Net Framewor...

MilosR | May 13, 2024