Kendo Globalization Overview
Edit this docGlobalization is the process of designing and developing an application that works in multiple cultures. The culture defines specific information for the number formats, week and month names, date and time formats and etc.
Kendo provides a way to internationalize the current page using a culture script. Kendo exposes culture(cultureName) method which allows to select the culture script coresponding to the "<language code>-<country/region code>". For complete overview of the culture method, review the Kendo API Reference.
Define the current culture
First let's start by adding the required culture script:
<script src="jquery.js"></script>
<script src="kendo.all.min.js"></script>
<script src="kendo.culture.en-GB.js"></script>
<!-- or when using the Kendo CDN -->
<script src="http://cdn.kendostatic.com/<version>/js/jquery.min.js"></script>
<script src="http://cdn.kendostatic.com/<version>/js/kendo.all.min.js"></script>
<script src="http://cdn.kendostatic.com/<version>/js/cultures/kendo.culture.en-GB.min.js"></script>
Now, you just need to set the culture script, which kendo should use:
<script type="text/javascript">
//set current to the "en-GB" culture script
kendo.culture("en-GB");
</script>
The default culture, which Kendo widgets uses is "en-US".
Kendo exposes methods which can format number or date object using specific format string and the current specified culture:
For more detail information check these helps topics:
Number Formatting
and
Date Formatting
Kendo exposes methods which converts the specified string to date or number object:
For more detail information, check these help topics:
Number Parsing
and
Date Parsing
When globalize.js is registered before Kendo scripts, then Kendo will use globalize.js features instead of Kendo Globalization.
Here is a list of widgets which depends on the current culture:
- Calendar
- DatePicker
- TimePicker
- DateTimePicker
- NumericTextBox