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

Localization of RadListBox through App_LocalResource file

4 Answers 65 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 12 Jul 2012, 08:55 PM
Hi,

I am trying to localize a RadListBox.

Here is the aspx markup:
<telerik:RadListBox ID="rlbReadOnlyGroups" runat="server" meta:resourcekey="rlbReadOnlyGroups">
</telerik:RadListBox>

Here is my resource file:
rlbReadOnlyGroups.EmptyMessage              Aucun groupe assigné
rlbReadOnlyGroups.AllToLeft                 Tous à gauche
rlbReadOnlyGroups.Localization.AllToLeft    Tous à gauche
rlbReadOnlyGroups.Localization-AllToLeft    Tous à gauche


As you can see, I tried to set the property "AllToLeft" by different means, but in all cases it fails to show the French translation "Tous à gauche". The EmptyMessage property is shown correctly, but all the property linked to the buttons does not work.

Anyone had this issue?

4 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 17 Jul 2012, 08:31 AM
Hello David,

You can find detailed information on how to use Localization with RadListBox in the following help article:
http://www.telerik.com/help/aspnet-ajax/listbox-localization.html 

You can also see it in action in the following demo:
http://demos.telerik.com/aspnet-ajax/listbox/examples/localization/defaultcs.aspx 
 
Greetings,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
David
Top achievements
Rank 1
answered on 17 Jul 2012, 01:28 PM
Thank you Bozhidar, but this does not explain why RadListBox is not localizable through an App_LocalResource file. The two hyperlink lead to examples using App_GlobalResource only. In our case, both English and French RadListBoxes need different translations used in different scenario (multiple ASPX pages).

At least, there is a workaround here by assigning the labels programmatically, but why can we assign some properties of the RadListBox with the App_LocalResource file, such as the EmptyMessage, and not the localization properties ?

Regards
0
Bozhidar
Telerik team
answered on 20 Jul 2012, 07:02 AM
Hello David,

I also tested the solution with local resources, and it worked as expected. I've attached the sample page I used to test this issue. Please note that in order for the text of the buttons to appear, you have to set the RenderButtonText property to "true" in the ButtonSettings section of the ListBox.
 
Greetings,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
David
Top achievements
Rank 1
answered on 20 Jul 2012, 04:07 PM
Well, thank you very much for your time. My real problem, in the end, was a misunderstanding of the LocalResource file.

The RadListBox "rlbAssignedUsers.Localization.AllToLeft" property was correctly set since the beginning in the translated resource file "Groups.aspx.fr-CA.resx", but was missing from the file "Groups.aspx.resx". I can see that all the properties must be set in both files.

Again, thank you for you help.
Tags
ListBox
Asked by
David
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
David
Top achievements
Rank 1
Share this question
or