Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

Page shortcuts are bypassing browser language preferences

$
0
0

Hi all

We're adding multilanguage support in our Episerver website. Some special constraints we have:

  • We don't have dedicated host names for the different languages we will support. All of them will be under company.org
  • We need to detect user browser's language preferences. If we don't have available content for the requested page in the preferred language, we go for the fallback / master language

After reading a lot of documentation we managed to make it work in most cases, but I've encountered an issue with EPiServer shortcuts that is bugging me...

In a non-multilingual scenario, consider a page called 'site-area', configured as a shortcut to a child page called 'home' so that when I navigate to company.org/site-area I'm redirected to company.org/site-area/home.

Going to a multilingual scenario, we translate both the 'site-area' and 'home' pages to spanish (es). Both english and spanish language versions are now created for both pages.

Master language and fallback language is english. No culture is set for the host in website settings. strictLanguageRouting=false in web.config. My browser language preferences are set to spanish (es).

In this scenario, when I navigate directly to these urls I see the contents in these languages:

  • company.org/en/site-area/home --> english
  • company.org/es/site-area/home --> spanish
  • company.org/site-area/home --> spanish (because of browser detection).

So far so good. Now let's see how the shortcut works...

  • company.org/en/site-area --> redirects to company.org/en/site-area/home (english)
  • company.org/es/site-area --> redirects to company.org/es/site-area/home (spanish)
  • company.org/site-area --> redirects to company.org/en/site-area/home (english)

The last case is what puzzles me... I expected to be redirected to the spanish version of the child page, since that's my browser preference. Instead, it looks like episerver completely bypassed my preferences and instead went on to the master language.

I've also tried disabling the fallback language for both site-area and home pages, but since the master language is still english, I guess it has no effect.

Have anyone else experienced this issue? Am I missing something here? Is this a bug?

Thanks in advance!


Viewing all articles
Browse latest Browse all 8020

Trending Articles