Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Multi-lingual and e-commerce View modes: 
User avatar
Member
Member
Nicola - 12/8/2010 3:55:39 PM
   
Multi-lingual and e-commerce
Hi,

I'm setting up a site that is mutli-lingual and uses the e-commerce feature. I've noticed that when I create a content item and associate it to a product, all language versions of that item are associated with the same product. However each language version of the product needs to have a different ProductID. What is the best way of setting this up? Do I need to create separate content items and products for every language? Does the e-commerce not support multi-lingual in the same way as content items?

Thanks,
Nicola.

User avatar
Member
Member
kentico_michal - 12/16/2010 9:05:28 AM
   
RE:Multi-lingual and e-commerce
Hi,

In general, documents in Kentico can be translated as it is described in our Developer´s guide, chapter Development -> Multilingual and international support.

E-commerce product is a little bit specific, since in current version we don´t support more language versions for product fields. Anyway, there is a very simple solution for this. Please find example for "Description" field (on Product -> General tab).

1. You can define new "Description" fields in COM_SKU system table in Site Manager -> Development -> System tables -> Ecommerce - SKU.
You can add new field for every culture version of description and named it like: Description_es-us, Description_cs-cz, Description_sk-sk, and so on.

2. Then, in transformation, you will show content of proper "Description" field via macro:
Eval("Description_" + CMS.CMSHelper.CMSContext.CurrentDocumentCulture)

Then every culture have its own description.

Best regards,
Michal Legen

User avatar
Certified Developer v6
Certified Developer v6
Nortech - 2/11/2011 6:45:48 AM
   
RE:Multi-lingual and e-commerce
Hi,

I have the same problem. Your suggestion does not work for me. The field name description_el-gr is not allowed since it contains the special character '-' .

I would like to propose another way to do this.

I am going to create an new form control which will contain a number of text boxes. Each text box will correspond to the available languages of the site. The control will format all text values in a localized text (e.g. {$=Hello|de-de=Hallo|it-it=Ciao$}) and return it to the caller. This value can then be stored to the SKUName field.

Please advice if I am on the right track.

Regards,
Ulysses Triantafillos

User avatar
Member
Member
kentico_michal - 2/22/2011 3:06:40 AM
   
RE:Multi-lingual and e-commerce
Hi,

Yes, this is also nice solution and possible way how to acomplish it. Thank you for letting us know about it.

Best regards,
Michal Legen

User avatar
Member
Member
m.rutter - 10/4/2011 7:46:12 AM
   
RE:Multi-lingual and e-commerce
Nortech wrote: I am going to create an new form control which will contain a number of text boxes ...


Hi Ulysses,
I have the same problem here. Did you creted the new form control? Could you share your solution?

Thank you.
Marcello


User avatar
Member
Member
kentico_michal - 10/10/2011 12:15:49 AM
   
RE:Multi-lingual and e-commerce
Hello,

You need to create a custom form control as it is described in the Developer’s guide: Developing form controls

It could contain a textbox for each culture:

<asp:TextBox runat="server" ID="en" ></asp:TextBox>
<asp:TextBox runat="server" ID="cz" ></asp:TextBox>


Then, you need to format entered values in a localization macro:

string localizationMacro = "{$=" + en.Text.Trim() + "|cs-cz=" + cz.Text.Trim() + "$}";

For more information about localization macros can be found here: Localization macros


Best regards,
Michal Legen