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

Not displaying the language in the url for default language in a Multi lingual website.

Vote:
 

Hi,

We have developed a site in en,en-gb and fr languages. We have set en-gb as default language.

Below are the diaplaying Urls in each language.

www.examplesite.com/en/sales

www.examplesite.com/fr/sales

www.examplesite.com/sales  ---> This is the default language (en-gb).

I want to display default language url as www.examplesite.com/en-gb/sales/.

Can you please advice how to achieve the above functionality. We are using Episerver 6.0

 

Thanks in advance.

Sharath

 

 

#42196
Aug 12, 2010 13:54
Vote:
 

What does your episerver.config file look like? The <site> tags:
<sites>
<site ......>
<siteHosts>
.....

#42213
Aug 13, 2010 6:55
Vote:
 

I have configured in EpiserverFramework.config as below.

<siteHosts siteId="CMSMULTI">
      <clear />
      <add name="*" />

      <add name="Multilingual.com" language="en-gb" />

</siteHosts>

 

The site is displaying properly. only the problem for default language corresponding language option is not displaying in the Url.

Am i missed anything here. Please advice.

Thanks and regards,
Sharath

#42214
Aug 13, 2010 8:37
Vote:
 

Try setting the web address prefix in admin mode:

Admin --> Config --> Manage Website Languages --> Select language English (en-GB) --> Set Web address prefix to 'en-gb' and Save

#42215
Aug 13, 2010 8:37
Vote:
 

Hi,

I have changed the settings as you mentioned but the changes are not reflecting in the Url.

I mean the language set in the episerverframework not displaying in the URL.

Could you please suggest.

#42216
Edited, Aug 13, 2010 8:52
Vote:
 

Hi,

Please some one address the above issue.

Thanks in advance.

Regards,
Sharath

#42316
Aug 18, 2010 19:38
Vote:
 

I know this is an old thread, but if someone has the same problem this might be a acceptable solution:

 

UrlBuilder urlBuilder = new UrlBuilder(this.Request.RawUrl);

if (!urlBuilder.Path.StartsWith(string.Concat('/', CurrentPage.LanguageID, '/')))
{
    this.Response.Redirect(UriSupport.AddLanguageSelection(CurrentPage.LinkURL, CurrentPage.LanguageID));
}

    

Regards,

</Jonas>

#62930
Nov 05, 2012 15:19
* 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.