We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Set locale globally


Is there any way to set locale globally for all controls at one place? So I could write something like this:




I've searched but not found any information in documentation or forums, there are only help topics about how to set locale for concrete instance of localizablу controls.
Any help would be appreciated.

1 Reply

ES Ezhil S Syncfusion Team June 26, 2015 12:20 PM UTC

Hi Dmitry,

Thanks for your interest with Syncfusion products.

Currently we haven’t provided in built support to set Locale for all Syncfusion control in application wide. You can achieve this by setting the “locale” property for all the Syncfusion widgets before the control is rendered. Please refer the following code snippet,

        <script type="text/javascript">

                var globallocale = "ru-RU";

                var widgetsall = ej.widget.registeredWidgets;

                for (var wd in widgetsall) {

                    //this will set locale property to the `ru-RU` if locale property is available in defaults.

                    if (ej.getObject("proto.defaults.locale", widgetsall[wd]))

                        ej.createObject("locale", globallocale, widgetsall[wd].proto.defaults);

Note: You have to add the above code in Master page or before the control rendering so that the locale will be set for all the controls.

Sample prepared can be downloaded from the link below:

Please let us know if you have any other queries.

Ezhil S

Live Chat Icon For mobile
Up arrow icon