Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Multiple Resource String View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 10/31/2011 11:29:18 PM
   
Multiple Resource String
Hi guys,

I am on the checkout pages of shopping cart .

I want to change the text called "User registration". I added a resource string in the UI Culture called "shoppingcart.checkregistration". It works so I have changed the text.

But now on the same instance of kentico , I am creating an another ecommerce site where I would like to have different text for this resource string "shoppingcart.checkregistration".

How can I achieve this?

Thanks
Gitesh Shah

User avatar
Kentico Support
Kentico Support
kentico_radekm - 11/1/2011 3:15:55 AM
   
RE:Multiple Resource String
Hello.

I would recommend you to add a new string into CMSResources/cms.resx file and modify \CMSModules\Ecommerce\Controls\ShoppingCart\ShoppingCartCheckRegistration.ascx.cs file, so you can decide what string will be loaded according to current site's name.

By default, there is following line of code in LoadStep() method:

this.lblTitle.Text = GetString("ShoppingCart.CheckRegistration");


You can change it like this:

switch (CMS.CMSHelper.CMSContext.CurrentSiteName)
{
case "A": this.lblTitle.Text = GetString("ShoppingCart.CheckRegistration"); break;
case "B": this.lblTitle.Text = GetString("ShoppingCart.CheckRegistration_B"); break;
case "C": this.lblTitle.Text = GetString("ShoppingCart.CheckRegistration_C"); break;
default: this.lblTitle.Text = GetString("ShoppingCart.CheckRegistration"); break;
}


Best Regards,
Radek Macalik



User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 11/2/2011 7:59:31 PM
   
RE:Multiple Resource String
Thanks Radek,

This works perfect.

Cheers
Gitesh Shah