Portal Engine
Version 3.x > Portal Engine > Localizing the .net user control View modes: 
User avatar
Member
Member
batchahaja-socpa.org - 4/4/2012 8:36:06 AM
   
Localizing the .net user control
Hi we are using kentico version6.0

We would like have a user control for our menus, so we created the menu as a user control and register this as a web part in kentico. Now the problem is we need this user control should use the resource file to display bilingual content. we did the steps given below.

http://devnet.kentico.com/Knowledge-Base/Content-Management/Localization-pack-installation.aspx.

While switching between English and Arabic the user control is not loading the text accordingly. i.e English and Arabic

We created our user control as "Searchpanel.ascx" and we created the resource file as
"SearchPanel.ar-ae.ascx.resx"

Hence it is our main requirement so assist us on this issue.


User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 4/5/2012 8:15:02 AM
   
RE:Localizing the .net user control
Hi,

the name of resource file should be custom.ar-ae.resx

How to create this file and where to place it is described here:
Custom resource files

Then the make your code multilingual its labels and text parts should be set as:

lblTitle.Text = GetString("Polls_New.TitleLabel");

The part in the method is a code name of your culture string.

Best regards,
Ivana Tomanickova