I want to add language ID in my URL. My current website shows testpage as https://www.example.com/testpage, I want to add labguage id in between, https://www.example.com/sv/testpage.
I tried enabling english language and adding it thorugh Language setting to my root and start page as well as fallback labguage, but it didnt worked.
I am using EPiServer 9 with Azure Cloud hosting.
Quick reply is appreciated.
Thanksn in advance,
If you have set the default language for a host in admin, the language segment for that language will be removed. You can change this in admin normally under admin/manage websites
Thanks for quick reply :)
In Manage Websites -> Settings section, I tried to remove the Type from "Primary" to empty. Still it didnt worked. Anything specific I need to do for adding Langauge code for my deault lanague?
Waiting for your reply.
That setting isnt relevant for this problem. You should have the option to set the default culture per host there as well. The setting is called culture and is on the same page where you set the type. (Admin/Config/SiteInformation). If you set this to en for example, that would mean that Episerver won't use a /en in url for english language since that is the default. If you remove the default culture there, you will always display language segment /en or /sv or similar. It sound like you have swedish like your default language. Removing that should display the /sv. If you use strict language handling though, that might mean that it will give 404 if you try going to a page without language segment if you remove the default language. Normally you specify a default culture and remove the language segment for that site.
I have the problem that my homepage doesn't render the language segment in the URL. All the links in the page does but the homepage URL doenn't. Is there a fix for this or do I need to redirect to /en/ when on the homepage?