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

How to Change Language??

3 Answers 326 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Armando
Top achievements
Rank 1
Armando asked on 02 Jul 2009, 06:32 PM
Hi, i need to change the language for the option EnableFiltering in a GridView,  is it posible? For Example "Ends With" to "Termina con"


Regards!!

3 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 03 Jul 2009, 06:03 PM
Hi Armando ,

You should inherit the RadGridLocalizationProvider class. You should also override the GetLocalizedString method and return return localized strings. Then change the grid localization provider by setting the  CurrentProvider property. Here is a sample:

RadGridLocalizationProvider.CurrentProvider = new myprovider(); 
public class myprovider : RadGridLocalizationProvider 
    public override string GetLocalizedString(string id) 
    { 
        if (id == RadGridStringId.FilterFunctionEndsWith) 
        { 
            return "Ends with"
        } 
        return base.GetLocalizedString(id); 
    }  

I hope this helps. If you have more questions, don't hesitate to write us back.

All the best,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Armando
Top achievements
Rank 1
answered on 06 Jul 2009, 09:08 PM
Thank you for your answer, i have a last question, this class how implement in my radGridView, sorry but i'm novice with Telerik
0
Deyan
Telerik team
answered on 07 Jul 2009, 08:31 AM
Hi Armando ,

Thanks for your question. The code snippet below shows exactly how to localize the 'Ends with' string in the RadGridView control. There is nothing more that you should do except returning 'Termina con' in the if statement within the GetLocalizedString method.

Basically, the myprovider class is already assigned as the default localization provider for RadGridView control and thus each time the Grid requests a string for the RadGridStringId.FilterFunctionEndsWith ID, it will receive 'Termina con'.

I hope this is helpful.

Regards,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Armando
Top achievements
Rank 1
Answers by
Jack
Telerik team
Armando
Top achievements
Rank 1
Deyan
Telerik team
Share this question
or