Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Fallback language in Commerce



I would like to implement a fallback language in Optimizely Commerce. I found some solution on ⁠github that I have implemented. 
Unfortunately it works not for all catalogues. And I cannot understand why it only works for some catalogues.

 Please follow my examples. First catalog is working fine, but the second one isn't (I mean, I got 404 error). 
The only thing I've noticed is difference between the SEO URL parameters, but it is wired because I don't use the SEO URI format.

 Example 1

Example 2

What is more, the second example works correctly when I have changed the Name in URL parameter (I've added suffix gb).

Could someone please help me understand what is wrong?

Jan 26, 2023 9:55

The code in question only fallback to netural version.

Jan 26, 2023 17:10

Aslo full support is available in commerce 14, you should consider upgrading

Jan 26, 2023 17:22

Thank you for your reply. In my previous message I forgot to add that I've modified the GetNeuturalLanguage method. It is my current definiton

private static string[] GetNeuturalLanguage() {

               return new string[] { "en-GB" };



I've tested the fallback language in Foundation project (.NETCore version) but unfortunetly it doesn't work.

These are my steps to configure the fallback language in the Foundation project.

  1. Go to CMS -> Admin -> Config and I enabled en-US language
  2. Go to CMS -> Home page -> Language Settings and I set fallback language as below

      3. Go to Commerce -> Fashion catalogue and I ticked the English (United States) checkbox and published the catalogue.

      4. Go to the pages

https://localhost:5001/en/fashion/womens/womens-tees/ - it works ok

https://localhost:5001/en-us/fashion/womens/womens-tees/ - I got a 404 error

Do you have any idea what I have done wrong?

Jan 27, 2023 15:40
Edited, Jan 30, 2023 3:07

Thanks. It works well in the Foundation project (.NET Core version). 

But in the .NET Framework I still have a problem.
I've added this code to the Foundation project (branch full-framework/master) and I've noticed that this implementation does not work for this product

This looks like the same as the issue in my application. Do you have any idea why the above example doesn't work? 

Jan 31, 2023 15:42
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.