Try our conversational search powered by Generative AI!

Language in the Product page?


When I'm browsing the normal pages, I can see that the language part of the url (http://mysite/sv/anypage/) gets picked up from examining Thread.CurrentThread.CultureCulture (sv-SE).

However in the product page links that I retrieve from ResolveUrl(StoreHelper.GetEntryUrl((Entry)Container.DataItem)), there are no /sv/ part of the url. If I go to a product page and add /se to it, like this:


I can't see anywhere that the sv-SE has been picked up. It's only en-US.

Here's what logging tells me:

[3012] 2012-05-10 16:36:17,893 [158] DEBUG EPiServer.Web.UrlRewriteModuleBase [(null)] - Starting request with Url http://localhost:17000/sv/Canon-PowerShot-Pro-Series-S5-IS-80MP-Digital-Camera-with-12x-Optical-Image-Stabilized-Zoom.aspx
[3012] 2012-05-10 16:36:17,900 [158] DEBUG EPiServer.Web.UrlRewriteModule [(null)] - Returning URL http://localhost:17000/Templates/MyProject/Pages/Product.aspx?ec=013803079616&id=9__CatalogPageProvider&epslanguage=EN-US as PageReference http://localhost:17000/Templates/MyProject/Pages/Product.aspx?ec=013803079616&id=9__CatalogPageProvider&epslanguage=EN-US
[3012] 2012-05-10 16:36:17,901 [158] DEBUG EPiServer.Web.UrlRewriteModuleBase [(null)] - 17.1.3 UrlRewriteModule rewrites from 'http://localhost:17000/sv/Canon-PowerShot-Pro-Series-S5-IS-80MP-Digital-Camera-with-12x-Optical-Image-Stabilized-Zoom.aspx' to 'http://localhost:17000/Templates/MyProject/Pages/Product.aspx?ec=013803079616&id=9__CatalogPageProvider&epslanguage=EN-US'

What should I do to get the Product page to work with languages?

May 10, 2012 16:38


Which version of EPiServer Commerce do you have installed? 

May 10, 2012 22:34

5.2 build 377

May 11, 2012 10:29

It is highly recommended, if possible, that you upgrade to Commerce 1.0 R2 SP2 as it contains fixes for multi-language product page URLs.

May 12, 2012 0:46

I have now upgraded to Commerce 1.0 R2 SP2 and the issue is still the same.

It also seems that if I'm on localhost:17000/es-ES/Product-Listing all the links (except product links) goes to localhost:17000:/en-US/Product-Listing.

The product links doesn't get any language prefix.

If I add the following code to ProductListing the links (except product links) keep the current language code:

protected override void InitializeCulture()
            Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
May 15, 2012 10:53

There url for the product detail page is mainted in the url of the seo tab of the product.  If you use the same url you will need to set the current ui cultire like u have above.

May 24, 2012 20:21

Sorry, but I don't understand how it's supposed to work. How should I create links to the product pages and how do I get the content there localized?

May 25, 2012 8:49

You need to set the seo url on the seo tab of the product / sku as explaned here

If you want to test the lanaguage then either switch the Thread.CurrentThread.CurrentUICulture or create a new seo url for each lanaguage of the product 




May 25, 2012 23:53
* 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.