This is a migrated thread and some comments may be shown as answers.

Localization support for RadTextBox/password strength?

2 Answers 76 Views
Input
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 2
Kevin asked on 17 Jun 2016, 04:28 PM

I have a RadTextBox field used as a password entry field.  Furthermore, I'm using the built-in password strength indicator for this field as follows:

    PasswordStrengthSettings  ShowIndicator="true"

I need for the strength text to be culturally sensitive but I'm not seeing a Localization attribute to work with.  How can this text be set?

 

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 17 Jun 2016, 05:28 PM

Actually, I found how these are set by this page:  https://demos.telerik.com/aspnet-ajax/textbox/functionality/password-strength-checker/defaultcs.aspx

While the property takes a delimited list, it was a bit more difficult since I use resource files.  It would have been nice to set these in a declarative way such as this:

<PasswordStrengthSettings  TextStrengthDescriptions="<%$ Resources: Mystrings, lblOne %>;<%$ Resources: Mystrings, lblTwo %>;<%$ Resources: Mystrings, lblThree %>;<%$ Resources: Mystrings, lblFour %>;<%$ Resources: Mystrings, lblFive %>"  ...

or even with a bound, server-side string variable (concatenation) but this is invalid.

 

What I ended up doing was tapping the textbox's OnLoad event:

    <telerik:RadTextBox runat="server" ID="rtbPassword" OnLoad="rtbPassword_Load" ...

and setting this property in the server-side OnLoad event code like this:

    rtbPassword.PasswordStrengthSettings.TextStrengthDescriptions = string.Format("{0};{1};{2};{3};{4}" ...

 

Not the best solution in my opinion, but it does work.

 

0
Maria Ilieva
Telerik team
answered on 22 Jun 2016, 02:53 PM
Hello Kevin,

I'm glad to hear that you were ale to find solution on your end and thank you for sharing it in the forum. It will be of a big help for other users that are implementing the same scenarios.


Regards,
Maria Ilieva
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Input
Asked by
Kevin
Top achievements
Rank 2
Answers by
Kevin
Top achievements
Rank 2
Maria Ilieva
Telerik team
Share this question
or