Portal Engine
Version 3.x > Portal Engine > Change text of cms:LocalizedLabel? View modes: 
User avatar
Member
Member
Cogeian - 3/11/2009 1:23:36 AM
   
Change text of cms:LocalizedLabel?
Hello all!

I"ve looked through the developer's guide but I can't seem to find this.

I have a login form on one of my Kentico pages. The default label text for the username field is "Username". The control code looks like this:

<cms:LocalizedLabel ID="lblUserName" runat="server" AssociatedControlID="UserName" />

I'd like to be able to change the label text. How do I do it?

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 3/12/2009 8:25:47 AM
   
RE:Change text of cms:LocalizedLabel?
Hello,

You can create copy (http://www.kentico.com/docs/devguide/modifying_the_design_of_standa.htm) of the LogonForm web part first. Then you can modify following lines in copied web part as you need (lines 162-167 in code-behind of web part in version 4.0):

// Set logon strings
LocalizedLabel lblItem = (LocalizedLabel)Login1.FindControl("lblUserName");
if (lblItem != null)
{
lblItem.Text = "{$LogonForm.UserName$}";
}

You can also simply change default translation for 'LogonForm.UserName' resource string instead (http://www.kentico.com/docs/devguide/international_support.htm).

Best Regards,

Martin Dobsicek

User avatar
Member
Member
Armysniper89 - 9/14/2010 2:15:24 PM
   
RE:Change text of cms:LocalizedLabel?
How do you change the default translation for LogonForm.UserName? The link you have here is out dated.

User avatar
Member
Member
Armysniper89 - 9/14/2010 2:35:58 PM
   
RE:Change text of cms:LocalizedLabel?
http://devnet.kentico.com/docs/devguide/index.html?configuring_multilingual_ui.htm

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 9/15/2010 9:03:35 AM
   
RE:Change text of cms:LocalizedLabel?
Hi,

You can change the text of "LogonForm.UserName" resource string in database or in resource file:

http://devnet.kentico.com/docs/devguide/configuring_multilingual_ui.htm

Best regards,
Miroslav Remias.