DropDownList cannot support different language

2 posts, 0 answers
  1. Kun
    Kun avatar
    44 posts
    Member since:
    Aug 2018

    Posted 14 Aug 2019 Link to this post

    Hello,

    In my form, there are 2 resources (in English and in French). I found out the text of listdataitem/descriptionlistdataitem in dropdownlist cannot be set in the language resources. In whatever language it just modified the text in the designer file.

    That is what I found in my designer file:

    '
    'RadDropDownList1
    '
    resources.ApplyResources(Me.RadDropDownList1, "RadDropDownList1")
    Me.RadDropDownList1.Name = "RadDropDownList1"
    Me.RadDropDownList1.ThemeName = "AcksysOffice2010Silver"
    RadListDataItem1.Text = "ListItem 1"
    RadListDataItem2.Text = "ListItem 2"
    DescriptionTextListDataItem1.DescriptionText = "FR Description 3"
    DescriptionTextListDataItem1.Text = "ListItem 3"
    DescriptionTextListDataItem2.DescriptionText = "FR Description 4"
    DescriptionTextListDataItem2.Text = "ListItem 4"
    Me.RadDropDownList1.Items.Add(RadListDataItem1)
    Me.RadDropDownList1.Items.Add(RadListDataItem2)
    Me.RadDropDownList1.Items.Add(DescriptionTextListDataItem1)
    Me.RadDropDownList1.Items.Add(DescriptionTextListDataItem2)

     

    To reproduce the issue:

    1. Create a dropdownlist, and then create a textlistdataitem in it. Modify the text of the textlistdataitem to "Text A".

    2. Change the form language to French ( or any other language)

    3. Modify the text from "Text A" to "Text B".

    4. Run the program in English windows and then in French Windows

    You will found out the text is always "Text B". Actually, it hasn't created the French text in the French resource, it just modified "Text A" to "Text B".

     

    Thank you for advance.

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    4126 posts

    Posted 15 Aug 2019 Link to this post

    Hello, Kun, 

    We already have a similar request for localizing the items in RadDropDownList. You can track its progress, subscribe for status changes and add your comments on the following link - https://feedback.telerik.com/winforms/1371594-improve-raddropdownlist-add-functionality-for-localization-of-the-radlistdataitems-text-property-localizable

    Currently, the possible solution that I can suggest is iterate the Items collection at run time and considering the current language, set the respective Text to the items in RadDropDownList.

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top