How to check if jQuery Globalize is initialized?

482 Views Asked by At

I am using the jQuery Globalize library which uses cldr for internationalization. Before you can use any of the Globalize functions, you have to load the correct cldr-data and pass it to Globalize.

Is there a way to check if this initialization has already happened and Globalize is ready for use?

I have some code that is executed on each $(document).ajaxComplete() and I need to make sure some of it only runs after Globalize is ready.

1

There are 1 best solutions below

0
Phil On

Old issue, but i found that checking the cldr value did it for me:

if (Globalize.cldr != null)
{
    ...
}