Language in the Product page?

Vote:
 

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:

http://localhost:17000/sv/Canon-PowerShot-Pro-Series-S5-IS-80MP-Digital-Camera-with-12x-Optical-Image-Stabilized-Zoom.aspx

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?

#58906
May 10, 2012 16:38
Vote:
 

Hi,

Which version of EPiServer Commerce do you have installed? 

#58914
May 10, 2012 22:34
Vote:
 

5.2 build 377

#58923
May 11, 2012 10:29
Vote:
 

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.

#58954
May 12, 2012 0:46
Vote:
 

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()
        {
            base.InitializeCulture();
 
            Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
        }
#58980
May 15, 2012 10:53
Vote:
 

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.

#59220
May 24, 2012 20:21
Vote:
 

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?

#59230
May 25, 2012 8:49
Vote:
 

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

http://webhelp.episerver.com/Commerce/1.1.2/Content/User%20Guide/CatalogManagement/Creating%20a%20Variation%20or%20a.htm

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 

 

 

 

#59251
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.