Questions tagged [javascript-globalize]

JavaScript globalization and localization. Formats and parses strings, dates and numbers in over 350 cultures

JavaScript globalization and localization. Formats and parses strings, dates and numbers in over 350 cultures

Documentation: http://wiki.jqueryui.com/Globalize

Source: https://github.com/jquery/globalize

43 questions
199
votes
14 answers

How to declare a global variable in React?

I initialized i18n translation object once in a component (a first component that loads in the app ). That same object is required In all other components. I don't want to re-initialize it in every component. What's the way around? Making it…
sapy
  • 8,952
  • 7
  • 49
  • 60
12
votes
4 answers

Globalize.js - how to parse date and time rather than just date

Globalize.js allows you to parse a date string based on the current culture applied var date = Globalize.parseDate("17/07/2013"); //Wed Jul 17 00:00:00 PDT 2013 What I would like to do is parse a DateTime. The javascript Date object handles this,…
Kevin
  • 2,752
  • 1
  • 24
  • 46
7
votes
1 answer

Webpack Globalize fails build when set to production mode: No formatters or parsers provided

I'm working on a React/Webpack/Globalize app. In development mode things are ok-ish (though Globalize insists on compiling all locales instead of the one i have selected but that's another question for another day). However, when I'm setting…
Harel
  • 1,989
  • 3
  • 26
  • 44
7
votes
1 answer

How to use Globalize 1.0 and get specified culture info

How to use Globalize 1.0 in html web application . I need to get the below information using Globalize 1.0 support How to create simple sample with Globalize 1.0 support. How to get the default currency and percentage symbol using Globalize 1.0…
5
votes
3 answers

Globalize.js API changes and jQuery UI

I'm trying to play with the examples from jQuery UI, such as this one. I would like to use the globalization functions (for a currency field, for example), but it seems that Globalize.js has gone through a major API change, so that the code used in…
Eduardo Dobay
  • 695
  • 1
  • 7
  • 15
4
votes
0 answers

How to get the 3 digit currency code from locale Globalize

I'm trying to use globalize 1.x in my angular project.I want to know whether there is any way to get the 3 digit currency code from the locale .For example if the locale is en-us ,how can i get USD from it .My scenario is i want to use…
dockerrrr
  • 277
  • 1
  • 5
  • 17
4
votes
1 answer

Globalize.js E_DEFAULT_LOCALE_NOT_DEFINED error

I'm developping an ASP MVC application that use Globalize.js. In the _Layout.cshtml I added this code