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

Changed Kendo Culture not applied.

6 Answers 1322 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Laurent
Top achievements
Rank 1
Laurent asked on 24 Aug 2015, 10:39 AM

Hi,

 I've have to use Kendo Grid in several languages but in the same decimal and dates format (fr-FR). I managed to change Kendo language.

 I also add the script and add the routine to change kendo culture.

 

<head>
...
    <script src="~/Scripts/Kendo/cultures/kendo.culture.fr-FR.min.js"></script>
    <script>
        kendo.culture('fr-FR');
    </script>
</head>

I also add in web.config;

<system.web>
    <globalization culture="fr-FR" />
 </system.web>

If I put a breakpoint and examine kendo variable, i have kendo.cultures.current = 'fr-FR'. The culture file is correctly included in page sources.

 Yet, the display format remains incorrect and when I edit a grid inline, I also have problems with validation.

 Am I missing something?

6 Answers, 1 is accepted

Sort by
0
Accepted
eo
Top achievements
Rank 1
answered on 24 Aug 2015, 04:51 PM

Hello Laurent,

It doesn't seem to me like you're missing anything. I would try different browsers and also here is some configuration that can be changed for the server-side culture.

0
Atanas Korchev
Telerik team
answered on 26 Aug 2015, 10:21 AM
Hello,

Could you paste here your grid configuration? Are you using server or ajax binding? The kendo-ui culture affects only ajax binding. Server-side binding will obey the current .NET culture.

Also what is the format that doesn't work?

Here is a live demo showing how things should work with ajax binding: http://dojo.telerik.com/@korchev/EpoFo

Regards,
Atanas Korchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Laurent
Top achievements
Rank 1
answered on 31 Aug 2015, 10:16 AM

I first wanted to use simple html or razor element and it did'nt work (it still don't).

Finally, to sove this issue I decided to use kendo element to edit grid inline. As kendo was properly configured, its elements fit Culture and UICulture.

Thanks for your help.

0
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 06 Dec 2017, 09:49 AM

Hi,

Has anyone solved this issue?

I have the following code

<script src="/Scripts/cultures/kendo.culture.ro-RO.min.js"></script>
<script>
    console.log("ro-RO " + kendo.getCulture().name);
    kendo.culture("ro-RO");
    console.log("ro-RO " + kendo.getCulture().name);
</script>

and the output surprise-surprise is this

ro-RO en-US
ro-RO en-US
So doesn't the function kendo.culture do anything?

0
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 06 Dec 2017, 09:59 AM

Hi,

So the output I solved because I copied the code from telerik and the path to the culture was wrong. However it seems that the parsing is still done using the en-US formats.

0
Stefan
Telerik team
answered on 08 Dec 2017, 07:19 AM
Hello, Dan,

The parsing should be done for the set culture as well.

This should also affect how the values are sent to the server.

Check how changing the culture in the demo will affect the dates format on submit:

http://dojo.telerik.com/aMONem

If additional assistance is needed, please provide a runnable example and I will gladly assist.

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
Laurent
Top achievements
Rank 1
Answers by
eo
Top achievements
Rank 1
Atanas Korchev
Telerik team
Laurent
Top achievements
Rank 1
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Stefan
Telerik team
Share this question
or