We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to localize excel-like _date_ filter captions in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

136476 Mar 15,2018 12:43 PM UTC Mar 19,2018 04:05 AM UTC WinForms 3
loading
Tags: GridGroupingControl
amsm
Asked On March 15, 2018 12:45 PM UTC

hi,
how can I localize captions displayed in excel-like filter of type datetime in GridGroupingControl ?
(captions 1 to 4):



regards,
Adam


Arulpriya Ramalingam [Syncfusion]
Replied On March 16, 2018 12:44 PM UTC

Hi Adam, 
 
Thanks for contacting Syncfusion support. 
 
Query 
Response 
 
1)      The “Sort Oldest to Newest” and “Sort Newest to Oldest” strings in GridExcelFilter are used internally to set the strings in GridExcelFilter. This can be localized by implementing the ILocalizationProvider interface and modify the strings based on default string by using the GetLocalizedString () method. Please refer to the below code and sample, 
 
Code example 
 
public string GetLocalizedString(System.Globalization.CultureInfo culture, string name, object obj) 
{ 
    switch (name) 
    { 
        //Some code 
        //To localize the DateFilters 
        case "DateTimeFilters": 
            return "Terminzeit filter"; 
        //To set string for Sorting operations 
        case "SortOldesttoNewest": 
            return "&SortierenOldbisNew"; 
        case "SortNewesttoOldest": 
            return "&SortierenNewbisOld"; 
    } 
} 
2)      The “Date Filters” item can be localized by replacing the string "DateTimeFilters" in GetLocalizedString() method. Please make use of the attached sample. 
3)      As per our current support, CheckBox items of GridExcelFilters will be loaded based on the unique values of the records in the grid and the “(Blanks)” for Null/Empty values are added internally at our end. So, we have logged a bug report to provide localization support for “(Blanks)” string in GridExcelFilter. The fix will be included in our upcoming main release 2018_volume1_Sp2. 
4)      The month and year of DateFilters menu item can be replaced by strings to be displayed in menu items based on the default string. Please refer to the below code and sample, 
 
Code example 
 
public string GetLocalizedString(System.Globalization.CultureInfo culture, string name, object obj) 
{ 
    switch (name) 
    { 
        //Some code 
        //To localize the DateFilters dropdown items 
        case "Office2007FilterDateEquals": 
            return "gleich"; 
        case "Office2007Filterbefore": 
            return "Vor"; 
        case "Office2007Filterafter": 
            return "nach"; 
        case "Office2007Filterbetween": 
            return "zwischen"; 
        case "Office2007Filtertomorrow": 
            return "Morgen"; 
        case "Office2007Filtertoday": 
            return "heute"; 
        case "Office2007Filteryesterday": 
            return "gestern"; 
        case "Office2007FilternextWeek": 
            return "for nextweek"; 
        case "Office2007FilterthisWeek": 
            return "for This week"; 
        case "Office2007FilterlastWeek": 
            return "for last week"; 
        case "Office2007FilternextMonth": 
            return "for next month"; 
        case "Office2007FilterthisMonth": 
            return "for this month"; 
        case "Office2007FilterlastMonth": 
            return "for last month"; 
        case "Office2007FilternextQuarter": 
            return "for next quarter"; 
        case "Office2007FilterthisQuarter": 
            return "for this quarter"; 
        case "Office2007FilternextYear": 
            return "for next year"; 
        case "Office2007FilterthisYear": 
            return "for this year"; 
        case "Office2007FilterlastYear": 
            return "Terminzeit filter"; 
        case "Office2007FilteryearToDate": 
            return "for year to date"; 
        case "Office2007FilterallDatesInThePeriod": 
            return "for period"; 
        case "Office2007FiltercustomDateTimeFilter": 
            return "For Custom date filter"; 
        case "Office2007Filterquarter1": 
            return "For quarter1"; 
        case "Office2007Filterquarter2": 
            return "for quarter2"; 
        case "Office2007Filterquarter3": 
            return "for quarter3"; 
        case "Office2007Filterquarter4": 
            return "for quarter4"; 
        case "Office2007Filterjanuary": 
            return "for january"; 
        case "Office2007Filterfebruary": 
            return "for frbruary"; 
        case "Office2007Filtermarch": 
            return "for march"; 
        case "Office2007Filterapril": 
            return "for april"; 
        case "Office2007Filtermay": 
            return "for may"; 
        case "Office2007Filterjune": 
            return "for june"; 
        case "Office2007Filterjuly": 
            return "for july"; 
        case "Office2007Filteraugust": 
            return "for augest"; 
        case "Office2007Filterseptember": 
            return "for september"; 
        case "Office2007Filteroctober": 
            return "for october"; 
        case "Office2007Filternovember": 
            return "for novermber"; 
        case "Office2007Filterdecember": 
            return "for december"; 
       } 
} 
 
 
Note 
We already provided a dashboard sample to localize the default strings in GridExcelFilter and GridDynamicFilters. Please make use of the sample in your local machine at the below location, 
 
Dashboard sample location: <Install_Location>\Syncfusion\EssentialStudio\<Product_Version>\Windows\Grid.Grouping.Windows\Samples\Localization Samples\Localization Demo\CS 
 
Regards, 
Arulpriya 


amsm
Replied On March 17, 2018 02:26 PM UTC

thank You very much for help.

Arulpriya Ramalingam [Syncfusion]
Replied On March 19, 2018 04:05 AM UTC

Hi Adam, 
 
Thanks for the update. 
 
We are glad that the provided solution resolved your scenario. Please let us know, if you need any further assistance. 
 
Regards, 
Arulpriya 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon