Grid Localization

Hi.
How can I localize captions of buttons in a filter?

My settings:
        'grid': {
          ...
            'Item': 'запись',
            'Items': 'записей',
            'Print': 'Печать',
            'Excelexport': 'Экспорт в Excel',
            'Equal': "Равно",
            'NotEqual': 'Не равно'
        }

I would like to have a clear way of getting keys for localization in future.
Thanks.

Attachment: Screen_e49b4cdf.zip

3 Replies

VA Venkatesh Ayothi Raman Syncfusion Team March 22, 2018 09:55 AM UTC


Hi Kabanets, 

Thanks for using Syncfusion products. 

We went through your code example and screenshot that you have shared for us and found that do you want to apply Grid localization for FilterMenu. If so, we suggest you to use following code example to change your corresponding locale text for filter menu. 
'grid': { 
                . .  . 
               //following are Filtering localization text 
                'FilterButton': 'CustomFilter',                //change the corresponding locale text for menu filter 
                'ClearButton': 'CustomClear',                   
                'StartsWith': 'Starts With rock',               
                'EndsWith': 'Ends With',                        
                'Contains': 'Contains',                         
                'Equal': 'Equal',                               
                'NotEqual': 'Not Equal',                        
                'LessThan': 'Less Than',                        
                'LessThanOrEqual': 'Less Than Or Equal',        
                'GreaterThan': 'Greater Than',                  
                'GreaterThanOrEqual': 'Greater Than Or Equal',  
                 'ChooseDate': 'Choose a Date', 
                'EnterValue': 'Custom place holder',  
           . .   . 
            }, 

We have also prepared a sample for your convenience which can be referred from following link, 

Screenshot

 

Please let us know if you have any further assistance on this. 

Regards, 
Venkatesh Ayothiraman. 



KA Kabanets March 22, 2018 02:06 PM UTC

Thanks for your answer.
How can I localize buttons on a toolbar or a context menu of a grid?
How can I localize confirm or error dialogs in CRUD operations?
How can I determine the keys self?
Thanks.


VA Venkatesh Ayothi Raman Syncfusion Team March 23, 2018 11:49 AM UTC

Hi Kabanets, 

Thanks for the update. 

Query #1:” How can I localize buttons on a toolbar or a context menu of a grid? 
We can localize the Grid toolbar buttons and context menu like as follows, 
'grid': { 
 .  .  . 
//Toolbar locale text 
    'Add': 'Add', 
    'Edit': 'CustomEdit', 
    'Cancel': 'Cancel', 
    'Update': 'Update', 
    'Delete': 'Delete', 
    'Print': 'Print', 
    'Pdfexport': 'PDF Export', 
    'Excelexport': 'Excel Export', 
    'Wordexport': 'Word Export', 
    'Csvexport': 'CSV Export', 
    'Search': 'Search', 
    'Columnchooser': 'Columns', 
    'Save': 'Save', 
 . .  . 
} 

For contextMenu items, 
'grid': { 
       . .  . 
        //Contextmenu locale text 
        'Copy': 'Customcopy', 
        'Group': 'Group by this column', 
        'Ungroup': 'Ungroup by this column', 
        'autoFitAll': 'CustomText', 
        'autoFit': 'Auto Fit this column', 
        'Export': 'Export', 
        'FirstPage': 'First Page', 
        'LastPage': 'Last Page', 
        'PreviousPage': 'Previous Page', 
        'NextPage': 'Next Page', 
        'SortAscending': 'Custom Sort Ascending', 
        'SortDescending': 'Sort Descending', 
        'EditRecord': 'Custom Edit Record', 
        'DeleteRecord': 'Custom Delete Record', 
        'FilterMenu': 'Filter' 
    }, 
 

Query #2:” How can I localize confirm or error dialogs in CRUD operations? 
We can localize the Grid confirm or error dialogs while performing CRUD operation like as follows, 
'grid': { 
       . .  . 
        //Edit or Delete if we doesn't select a record 
'EditOperationAlert': 'No records selected for edit operation', 
'DeleteOperationAlert': 'No records selected for delete operation', 
        //Edit buttons 
'SaveButton': 'Save', 
'OKButton': 'OK', 
'CancelButton': 'Cancel', 
        //Dialog Popup title for edit and add 
'EditFormTitle': 'Details of ', 
'AddFormTitle': 'Add New Record', 
        //If we enable batch editing 
'BatchSaveConfirm': 'Are you sure you want to save changes?', 
'BatchSaveLostChanges': 'Unsaved changes will be lost. Are you sure you want to continue?', 
        //Delete confirmation dialog 
'ConfirmDelete': 'Are you sure you want to Delete Record?', 
'CancelEdit': 'Are you sure you want to Cancel the changes?' 
       .  .  . 
    }, 

Query #3:” How can I determine the keys self? 
We can find the default locale text for Grid component from following online github link. Please refer to the following link for more details about locale texts, 

We have also prepared a sample for your convenience which can be referred from following link, 

Please let us know if you have any further assistance on this. 

Regards, 
Venkatesh Ayothiraman. 


Loader.
Up arrow icon