November Happy Hour will be moved to Thursday December 5th.

Never use language in url

Vote:
 

I would like to manage Episerver languages some other way than  the url. Meaning I have a site with multiple languages. I want a page to exist in mutiple languages but with the exact same url. The current language would be managed some other way - presumably cookie. I do not seem to be able to get the site to resolve the currentPage this way.

Example:

Page "my-page" exists in English and French. I want the url to always be my-page, no matter what. when resolving the url, I look at the parent of my-page, and see what the language is set to (Its set with drop down by an author). If its English, serve the English content, if its French, serve the French content.

#260410
Aug 10, 2021 17:30
Vote:
 

Google recommends using different URLs for each language version of a page rather than using cookies or browser settings to adjust the content language on the page.

Source: https://developers.google.com/search/docs/advanced/crawling/managing-multi-regional-sites

So it's probably not a good idea to use that on public websites. 

If you're building a closed area of the website which is restricted to employees/site members/whoever and which is essentially a web app with some editorial content, then you can use standard aspnet mvc controllers, attribute routing and fetch the content from CMS based on cookies/browser settings/user profiles/whatever...

#260411
Edited, Aug 10, 2021 18:56
Ethan Schofer - Aug 10, 2021 19:22
Its a requirement from the client. I dont have a choice. I think I need to make my own url resolver that ignores language. Also, its not actually multi lingual. A given page is only in one language. Its just that some pages are in some languages and some pages are in other languages. Maybe I should not be using the mutli lingual capabilities of Optimizely. I wonder if I should just have them enter the other languages on the English site. I would need to update the language tag in the html tag.
Dejan Caric - Aug 10, 2021 19:37
That could work (without knowing much about project requirements). Perhaps implement an editorial field in Epi which allows them to override the language that will be used in the HTML tag.

I once worked for a client which had similar requirements: 80-90% of articles had to be written in «bokmål» and 10-20% had to be written in «nynorsk» (two forms of Norwegian language). We solved that in exactly the same way, by enabling only one language and allowing the editors to override the language tag (there was a checkbox coz they only had two options). It worked flawlessly :)

Mark Stott - Aug 18, 2021 13:10
I would look to push back against this requirement. Cookies are specific to the user and device where a language component of the URL is not. This will have an impact on the user's ability to share content in a meaningful way with people of the same language base and it could have an implication in terms of SEO.
Ethan Schofer - Aug 18, 2021 13:24
Agreed. Push back is currently under way.
* 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.