Localization

23 Nov 20161 minute to read

EJWEB DateTimePicker has been provided with built-in localization support, so that it can adapt based on culture specific locale defined for it.

More than 350 culture specific files are available to localize the datetime. To know more about EJ globalize support, please refer the below link
http://help.syncfusion.com/js/localization

NOTE

Seven culture-specific script files are available in the below specified location. For all other culture files, please download from the GitHub location.

(installed location)\Syncfusion\Essential Studio\21.1.35\JavaScript\assets\scripts\i18n For example, If you have installed the Essential Studio package within C:\Program Files (x86), then navigate to the below location, C:\Program Files (x86)\Syncfusion\Essential Studio\21.1.35\JavaScript\assets\scripts\i18n

To translate our control content from default English to any of the culture, say For example - Spanish language, then you need to refer the ej.culture.es-ES.min.js file in your application,

The en-US locale is currently being used as default culture in DateTimePicker. You can set any other culture to DateTimePicker using Locale property. Below code example shows Spanish cultured DateTimePicker.

Refer the below Spanish culture file in head section of HTML page after the reference of ej.web.all.min.js file.

  • JAVASCRIPT
  • <script src="https://cdn.syncfusion.com/js/assets/i18n/ej.culture.es-ES.min.js"></script>

    The following code example is used to set DateTimePicker in Spanish language.

    In the ASPX page, include the following DateTimePicker control code example.

    <ej:DateTimePicker ID="DateTime" Locale="es-ES" runat="server"> </ej:DateTimePicker>
    protected void Page_Load(object sender, EventArgs e)
    
        {
    
            DateTime.DateTimePickerButtonText = new ButtonText() { Today = "hoy", Now = "ahora", Done = "terminado" };
    
        }