Localization of RadListBox through App_LocalResource file

5 posts, 0 answers
  1. David
    David avatar
    4 posts
    Member since:
    Jan 2012

    Posted 12 Jul 2012 Link to this post

    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?
  2. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 17 Jul 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. David
    David avatar
    4 posts
    Member since:
    Jan 2012

    Posted 17 Jul 2012 Link to this post

    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
  5. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 20 Jul 2012 Link to this post

    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.
  6. David
    David avatar
    4 posts
    Member since:
    Jan 2012

    Posted 20 Jul 2012 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017