SharePoint Online Language Functionality

Occasional Contributor

Hi 

 

I am working on a migration project with a site in multiple languages. A French Site page contains Quick links. If you click on a quick link, it should navigate to another French page but instead it is going to a English version of the page.  The French version of the page is available but SharePoint is not picking it up. 

 

If I use the dropdown to navigate to another language and click on the quick link again, the language functionality resets and is working correctly, E.g Spanish page quick link navigates to another Spanish page.  Therefore it is only the first time I access any language page that I am facing this problem. 

 

I have tried to reset the default language of the User but this has not resolved the issue. The URL for these language site pages are being accessed from a excel list, does this potentially affect the functionality?  

 

Jas0211_0-1637664768096.png

 

3 Replies

The trick is for the user to _never_ use that language dropdown. If the language dropdown is used, then the Multilingual Page Publishing features language redirection is temporarily disabled, or rather a session cookie named "siteLangPref" gets set which overrides the user's language content preference and makes it differ from the language preference in their profile until the browser session is re-started. Changing the profile will change the user's UI language preference, but the content preference is not the same thing.

@Martin Laplante 

 

Thanks for your quick response Martin. I think you're helping us to get to the bottom of this, but I'm not sure you understood what we're doing - sorry if I didn't explain it clearly.

 

Pages have been migrated into SP Online

The logged in user has a default language of English

 

  1. We visit a page "page A" from a link in Excel - this page is the German translation of a page with multiple translations and a base language of English. Checking to the top right dropdown (but not changing it) I confirm I have German set there.
  2. The German "Page A" has links on it, in a quick links web part - the links navigate to the base English page.
  3. What should happen is that after clicking the link on "Page A" to go to "page B" , you end up on the German version of the following page. You get to the French version instead. French is now shown in the dropdown (without you doing anything).

 

If we do something slightly different it resolves itself

 

  1. [Start the same] We visit a page "page A" from a link in Excel - this page is the German translation of a page with multiple translations and a base language of English. Checking to the top right dropdown (but not changing it) I confirm I have German set there.
  2. [change from here] Now we use the dropdown and click on the English version of "Page A", then click on a link, it navigates me to the English version of "Page B" which is correct. 
  3. Go back to the German "Page A"
  4. Click on the link on "Page A" to go to "page B" , this time you get to the correct German version.

 

 

So we think it might be related to the cookie that you mention? Somehow it's not being set correctly. Please can you suggest how we could resolve this issue?

 

I am giving a session on this topic in Germany next week, so this is an interesting puzzle.

There are a couple of ways in which you could achieve the result in the first scenario. To know which one, I would have to know a bit more about the current state of the user and their browser, for example the user's language setting in Delve, how long ago it was last changed, the language settings in the browser, and the value of that cookie. However that doesn't help with your site, being able to explain to users how getting content in a language they didn't want is based on subtle differences in browser state.

A few things that help to explain how you got that language version

1) Getting to a page through an external link, direct typing of URL, or selecting it from the Pages library doesn't trigger redirection to the user language version, but following internal links (usually) does trigger redirection
2) With a few unusual exceptions, the language you will be redirected to will be the language of the user interface, that is to say the menus and localized parts of the navigation, with the cookie able to override the redirection but not the interface language.
3) A year ago there were some query parameters that would override redirection, those seem to have disappeared since then
4) The fact that the quick links web part navigates to the English version seems to indicate that the redirection language is English, that could be confirmed if the UI is English and the cookie not present
5) Your expectation that clicking on a link to page A from a German page will send you to the German version is unrealistic. The language of the page from which the link is clicked is not a factor in determining the redirection language, only the UI language (itself based on user and browser properties) and the cookie set by the dropdown.
6) Why you get French is a bit of a mystery. It could be the cookie from a previous session, or it could be the UI language is French, but occasionally the redirection mechanism gets crossed links from multiple changes to pages. If you republish the translations and the original that resolves itself.