Try our conversational search powered by Generative AI!

Mark Hall
Apr 17, 2020
  8193
(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
Optimizely Search and Navigation - Part 2 - Filter Tips

Introduction Continuing from Part 1 – Search Tips , today I will share the next part – filter tips. The platform versions used for this article are...

Binh Nguyen Thi | Jul 1, 2024

Integrating HubSpot CRM without the MA Connector

Have HubSpot CRM? Want to push user data into it from Optimizely? Don’t have any personalisation requirements with that data? Don’t want to pay $80...

Matt Pallatt | Jun 27, 2024

Keeping the website secure by updating external packages

Did you see the latest warning from Optimizely to update this package with a critical security warning? https://world.optimizely.com/documentation/...

Daniel Ovaska | Jun 27, 2024

Optimizely CMS image anonymization now available for Linux!

The famous image anonymization add-on for Optimizely CMS, with at least 5 downloads, is now finally available for use on Linux. Supports simultaneo...

Tomas Hensrud Gulla | Jun 25, 2024 | Syndicated blog