Localizing RadColorPicker using Resource-files

5 posts, 0 answers
  1. Frank
    Frank avatar
    31 posts
    Member since:
    May 2006

    Posted 20 May Link to this post

    Hello,

    I'm trying to localize the RadColorPicker using resource-files placed in the App_GlobalResources of my website, which is working fine for most of the telerik controls (e.g. RadComboBox). In case of the RadColorPicker, adding these resource files doesn't seem change anything. For example the following code does not use any resource-file values for the texts and tooltips of "No color", "Custom color" as well as the "OK" and "cancel" buttons within the "Custom color" sub-control.

    <telerik:RadColorPicker runat="server" ID="RadColorPickerStatusColor" Preset="Standard" EnableCustomColor="true" SelectedColor="#FFFFFF" />

     

    Because I'm using this control in multiple places, I dislike the way localization for RadColorPicker is beeing described in the docs (Telerik Docs: RadColorPicker). Additionally, I'm not able to find the key for at least the cancel-button within the supplied resource files (en, de, fr; which are available for download at https://www.telerik.com/account/product-download?product=RCAJAX).

    As for the screenshot, the current Culture of the website is German, so I would expect the RadColorPicker to be displayed using the RadColorPicker.de-DE.resx file. Obviously these values are English though.

     

    Any tips on the missing key for the cancel-button or the fact, that there's no localization at all?

    Kind regards

  2. Peter Milchev
    Admin
    Peter Milchev avatar
    792 posts

    Posted 25 May Link to this post

    Hello Frank,

    Indeed it seems that some of the localization options are missing in the resource file and need to be updated. Here is a list of all available localization properties:

    public string OkButtonText { get; set; }
    public string RecentColors { get; set; }
    public string CustomColor { get; set; }
    public string BlankColorText { get; set; }
    public string HSVSliderDragText { get; set; }
    public string HSBSliderDragText { get; set; }
    public string RGBSlidersDragText { get; set; }
    public string RGBSlidersDecreaseText { get; set; }
    public string RGBSlidersIncreaseText { get; set; }
    public string ApplyButtonText { get; set; }
    public string HSVTabText { get; set; }
    public string HSBTabText { get; set; }
    public string RGBSlidersTabText { get; set; }
    public string WebPaletteTabText { get; set; }
    public string NoColorText { get; set; }
    public string CurrentColorText { get; set; }
    public string PickColorText { get; set; }
    public string CancelButtonText { get; set; }
    public string HexInputTitle { get; set; }
    

    Here is the list of missing properties to the existing resource files:

    Indeed there seems to be an issue with the ColorPicker reading the localization files even after the missing keys were added. Nevertheless, you can use the attached resource files and the code below to achieve the localization. Please keep in mind that the new keys' values need to be updated/translated 

    <telerik:RadColorPicker runat="server" Culture="de-DE" PaletteModes="All" ShowIcon="true">
        <Localization ApplyButtonText="<%$ Resources:RadColorPicker, ApplyButtonText %>"
            CurrentColorText="<%$ Resources:RadColorPicker, CurrentColorText %>"
            HSBTabText="<%$ Resources:RadColorPicker, HSBTabText %>"
            HSVTabText="<%$ Resources:RadColorPicker, HSVTabText %>"
            NoColorText="<%$ Resources:RadColorPicker, NoColorText %>"
            PickColorText="<%$ Resources:RadColorPicker, PickColorText %>"
            RGBSlidersTabText="<%$ Resources:RadColorPicker, RGBSlidersTabText %>"
            WebPaletteTabText="<%$ Resources:RadColorPicker, WebPaletteTabText %>"
            BlankColorText="<%$ Resources:RadColorPicker, BlankColorText %>"
            HSBSliderDragText="<%$ Resources:RadColorPicker, HSBSliderDragText %>"
            HSVSliderDragText="<%$ Resources:RadColorPicker, HSVSliderDragText %>"
            RGBSlidersDecreaseText="<%$ Resources:RadColorPicker, RGBSlidersDecreaseText %>"
            RGBSlidersDragText="<%$ Resources:RadColorPicker, RGBSlidersDragText %>"
            RGBSlidersIncreaseText="<%$ Resources:RadColorPicker, RGBSlidersIncreaseText %>"
            OkButtonText="<%$ Resources:RadColorPicker, OkButtonText %>"
            RecentColors="<%$ Resources:RadColorPicker, RecentColors %>"
            CustomColor="<%$ Resources:RadColorPicker, CustomColor %>"
            CancelButtonText="<%$ Resources:RadColorPicker, CancelButtonText %>"
            HexInputTitle="<%$ Resources:RadColorPicker, HexInputTitle %>" />
    </telerik:RadColorPicker>

    I have logged that in our feedback portal where you can subscribe it and get notified when there is any progress on it.

    As a token of gratitude for bringing this to our attention, we have updated your Telerik points.

    Regards,
    Peter Milchev
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
  3. Frank
    Frank avatar
    31 posts
    Member since:
    May 2006

    Posted 09 Jun in reply to Peter Milchev Link to this post

    Hello Peter Milchev,

    thanks for your response and for supplying the missing property names.

     

    I'm looking forward to be able to use the resource-files as intended, because as I've stated above, I'm using this control in many places and I really do not want to add this list of "<Localization .../>" to each and every usage.

    Just in case anyone else is looking for those property-names, you might want to update your docs.

    Kind regards.

  4. Frank
    Frank avatar
    31 posts
    Member since:
    May 2006

    Posted 09 Jun in reply to Peter Milchev Link to this post

    Hello Peter Milchev,

    thanks for your response and for supplying the missing property-names. Just in case anyone else is looking for those property-names, you might want to include the new ones into your Docs.

    As I've stated above, I'm using this control in many places, so I really do not want to include this "<Localization .../>" statement at each and every single usage. Therefore I'm really looking forward to be able to use the resource-files as intended/described previously.

    King regards.

  5. Peter Milchev
    Admin
    Peter Milchev avatar
    792 posts

    Posted 12 Jun Link to this post

    Hello Frank,

    You can subscribe to the feedback portal item to get notified when the Localization issue is fixed:

    Meanwhile, I have updated the documentation article and the new properties are available live:

    Regards,
    Peter Milchev
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top