How to localize RadUpload and RadProgressArea?

Thread is closed for posting
2 posts, 0 answers
  1. Dima
    Dima avatar
    7 posts
    Member since:
    Jan 2008

    Posted 17 Jun 2008 Link to this post

    Help me please! How to localize RadUpload and RadProgressArea? Where there should be resource files resx? Thanks!
  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 17 Jun 2008 Link to this post

    Hi Dima,

    To my regret currently the localization possibilities of the RadUpload for ASP.NET Ajax control are very limited. We are working on fixing this for the RadControls for ASP.NET Ajax Q1 2008 SP2 release. In the meantime you can use the following client-side JavaScript workaround:

    <telerik:RadUpload ID="RadUpload1"     
        OnClientAdded="OnClientAddedHandler"    
        runat="server"     
        ControlObjectsVisibility="All" /> 

    <script type="text/javascript">    
    function OnClientAddedHandler(upload, eventArgs)    
    {       
        if (upload.get_controlObjectsVisibility())    
        {    
            var uploaduploadElement = upload.get_element();    
            var inputs = uploadElement.getElementsByTagName("input");    
            for (var i = 0; i < inputs.length; i++)    
            {    
                var input = inputs[i];    
                var id = input.id;    
                //customize the Add Button    
                if (id == upload.get_id() + "AddButton")    
                {    
                    input.value = "Custom AddButton";    
                }    
                //customize the Remove button    
                if (id.indexOf(upload.get_id() + "remove") > -1)    
                {                    
                    input.value = "Delete it";    
                }    
                //customize the Clear button    
                if (id.indexOf(upload.get_id() + "clear") > -1)    
                {                    
                    input.value = "Clear it";    
                }    
                //customize the Select button                                
                if (input.className == "ruButton ruBrowse")    
                {    
                    input.value = "Browse it";    
                }     
                //customize the Delete button    
                if (id == upload.get_id() + "DeleteButton")    
                {    
                    input.value = "Custom Delete";    
                }    
            }    
        }    
    }    
    </script> 



    Kind regards,
    Paul
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top