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

Grid popup validation message localization

2 Answers 274 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Dan asked on 29 Mar 2018, 02:01 PM

Hi,

I have a grid that uses Popup editor. The model behind the grid has one property with Required attribute.

The application has to support multiple languages. All the grid and popup texts are translated except for the validation messages.

It seems that the template generated uses the english messages. 

"template":"\u003cdiv class=\"editor-label\"\u003e\u003clabel for=\"Name\"\u003eHersteller\u003c/label\u003e\u003c/div\u003e\u003cdiv class=\"editor-field\"\u003e\u003cinput class=\"k-textbox\" data-val=\"true\" data-val-required=\"The Hersteller field is required.\" id=\"Name\" name=\"Name\" value=\"\" /\u003e \u003cspan class=\"field-validation-valid\" data-valmsg-for=\"Name\" data-valmsg-replace=\"true\"\u003e\u003c/span\u003e\u003c/div\u003e"

Is this function as design. How can I get the language specific message for validations too?

2 Answers, 1 is accepted

Sort by
0
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 02 Apr 2018, 06:46 AM

Hi,

I found my answer. It seems that the template is generated by telerik code but uses the DataAnnotations messages. So I had to define my own message in order to have a different message for other cultures.

0
Stefan
Telerik team
answered on 03 Apr 2018, 04:41 AM
Hello, Dan,

I'm glad to hear that the issue is resolved.

I can suggest the following article describing in more details the different options for validation:

https://docs.telerik.com/aspnet-mvc/getting-started/validation

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Stefan
Telerik team
Share this question
or