Skip to main content
Stack Overflow's 2025 Annual Developer Survey is still open — take the Survey before it closes
0 votes
0 answers
41 views

How do I stop a dynamic number and type of statements from executing until a series of ajax calls completes?

I have a MVC model website using C# that is created using a series of files. I am trying to use globalize.js for translating dates and date formats. Doing so requires me to load cldr data. I was doing ...
2 votes
1 answer
636 views

How to validate ICU messages syntax using Globalizejs?

There are a few i18n libraries available in JavaScript and one of the most complete ones seems to be GlobalizeJs. While testing it, I found a problem when I send invalid ICU messages. It seems to ...
0 votes
0 answers
163 views

Angular 8 - Globalize is not defined after ng build

I am using Angular CLI 8.1.1 and JqWidgets 8.* When serve the application using ng serve everything works fine. Although when run with ng build I get an error Globalize is not defined Can someone ...
3 votes
2 answers
1k views

Globalize.js - cldr.once is not a function

I'm using Globalize.js script in my app to work with locales. All works well, except currency formating. When I use Globalize.currencyFormatter(currency), I'm getting this error TypeError: cldr.once ...
  • 33
0 votes
1 answer
639 views

globalize numbers and currency: en-IN/INR format not working as expected

I have two methods i'm trying to write using globalize. One to format Numbers and one to format Currency. function currencyFormatter(value, locale, fieldDefinition) { var formatter = Globalize(...
4 votes
0 answers
393 views

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 ...
  • 297
0 votes
2 answers
6k views

Cldr issue with globalize when implementing in angular cli

Im trying to create a angular 4 project with L10n support .I'm trying to use Globalize library in my project .But im getting a lot of error when compling my project.I dont want to use globalize-...
  • 297
1 vote
1 answer
460 views

Getting error globalize is undefined Typescript

I'm working on a angular 4 application which support L10n. Im using globalize. reference.Appcomponent.ts is as follows import { Component,OnInit } from '@angular/core'; import globalize from "...
  • 297
1 vote
1 answer
559 views

MVc 5 - validation german date with unobtrusiv js - a simple approach

The question: How get the unobtrusiv validation of a german date running in MVC? Because I can't find a running example of using globalize 1.x with MVC 5 to validate a german date I needed two days ...
  • 133
1 vote
1 answer
219 views

Globalize Version 1.2.3 - root/fallback Culture

i'm using the current release version 1.2.3 and would like to use the functionality described here: https://github.com/globalizejs/globalize/blob/6d3a5a57c56fd0afb93e20340905a435d1650341/doc/api/...
0 votes
1 answer
1k views

MVC 5 - can not get globalisation running

I want to add globalization because the site asks the user for a date. And my german user want to type "31.12.1966" and not "1966-12-31". So I add the nuget-Packages "jQuery.Validation.Globalize" and ...
  • 133
1 vote
1 answer
212 views

ExpressJS app.locals.title gives: Can't set headers after they are sent

I am new to ExpressJS, so I wanted to set a simple string value, I could translate. So I tried out globalize-express and set the app title like this: app.use(function (req, res, next) { console....
1 vote
2 answers
981 views

format datetime specific timezone

I am using globalize to format datetime per locale. var Globalize = require('globalize'); var formatter = Globalize('en-US').dateFormatter(); formatter(new Date()); It works great but I was wondering ...
2 votes
1 answer
3k views

SlikelySubtags.json not loaded

I use cldr and globalize libaries. And I read in docs that I need to load likelySubtags.json. Maybe, it is due to my poor English but I can't get where I need to get these files? Or how to generate? ...
-3 votes
1 answer
1k views

How to parse a date in the dd.mm.yyyy format?

I try to parse a date in the dd.mm.yyyyformat: Globalize.parseDate(value, "dd.MM.yyyy", "en"); but globalize crashes with errors: Uncaught Error: E_INVALID_PAR_TYPE: Invalid options parameter (...
2 votes
0 answers
414 views

Is it possible to make the minimum CLDR data needed by Globalize smaller?

We are using Globalize for some time now, but only for messages without plurals, so we only needed supplemental/likelySubtags in our application. Now that we want to use all modules, we also need to ...
1 vote
1 answer
51 views

Globalize bug in new v1.2.*? Parsing empty string returns 0

This question represents a proposed bug for Globalize. The owners of that project ask that it first be published as a SO question, so here we go... With the new version 1.2.1 (and 1.2.2) of Globalize ...
  • 5,537
1 vote
1 answer
152 views

Globalize bug in new v1.2.1? Parsing certain numbers returns NaN for 17 cultures (India, Bangladesh, Bhutan)

With the new version 1.2.1 of Globalize we're seeing 17 cultures for which parsing fails for numbers in the "hundreds" range (e.g. between 100 and 999). Here's a concrete example using the CLDR JSON ...
  • 5,537
1 vote
0 answers
812 views

Globalization 1.x with DevExtreme library

I have a question with the DevExtreme v.16.1 in combination with Globalize 1.x. They upgraded from 0.x to 1.x and I cannot make it work since the update. I put the loading of the librries in an ...
4 votes
1 answer
6k views

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 <script> (function () { $(function () { $.when( $.getJSON("@Url.Content("~...
  • 110
1 vote
0 answers
96 views

JQuery/Globalize: Method for finding best matching locale?

As an example I have loaded following locales: en de de-CH As code: Globalize.load( require('cldr-data').entireMainFor('en', 'de', 'de-CH')); When I call const globalize = Globalize(locale); without ...
2 votes
1 answer
1k views

npm install globalize - E_MISSING_BUNDLE

I'm sure this is a silly configuration problem but I cannot seem to figure it out. I'm using the globalize package within nodejs installed this way: npm install --save globalize cldr-data Which ...
  • 859
0 votes
1 answer
190 views

JQuery spinner for time

I would like to use the jquery spinner to display the time. In their example http://jqueryui.com/spinner/#time they use globalize.js. I am not sure where from to take this file from. please help.
  • 31
3 votes
1 answer
2k views

Globalize and cldr with requirejs

I am trying to Globalize. Below is my project configuration at present: At present I am not using the node environment, specifically not using either of npm or bower, rather using NuGet as package ...
  • 4,956
0 votes
1 answer
240 views

Consitent date, numbers formatting across C# (backend) and JS (front end)

I am writing a system which shows customer data in front-end, but also allows exporting data via back-end to various file formats. I am using globalize.js and .NET's native Globalization capabilities, ...
  • 1
7 votes
1 answer
2k views

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 ...
  • 2,039
214 votes
15 answers
643k views

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 ...
  • 9,628
1 vote
1 answer
201 views

Proper way of extending in Globalize 1.x

I had the following code to add custom functionality via Globalize 0.x: Globalize.parseFloatAcceptDotAndComma = function (value, radix, cultureSelector) { value = value.replace(Globalize....
  • 1,263
2 votes
1 answer
2k views

How to access culture data in globalize.js V1.0.0

I am migrating from Globalize.js V0.0.1 to V1.0.0. In V0.0.1 it was possible to access the loaded culture data as you can see below. How can I access the data with current version 1.0.0. var culture =...
  • 23
1 vote
1 answer
801 views

How to use Globalize 1.x to parse date

Can someone show me how to use Globalize 1.x to parse date according to a given culture? Without using bower or node. I've seen the example on the official site, but there they statically load the ...
  • 103
7 votes
1 answer
7k views

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 ...
3 votes
1 answer
887 views

MVC client validation

I have an ASP.NET MVC 5 Application that should accept the values in the German format. I tried to follow the instructions under Adding Validation to the Model but I cannot find the required globalize....
  • 2,883
0 votes
1 answer
2k views

Globalize formatDate the function returns "numberSymbol is not a function"

I tried the same example: https://gist.github.com/rxaviers/9fec3ae0dfb7cdb0a0ce When trying to use: en.formatDate(new Date(), { datetime: "medium" }); I get TypeError: numberSymbol is not a function ...
-1 votes
2 answers
3k views

Globalize.format not formatting the date to "dd/MM/yyyy" format

I am using Globalize.js to format a date. But it is not working properly with German culture (de-DE) and the date format "dd/MM/yyyy" I have changed the system locale to German culture and also ...
0 votes
2 answers
2k views

jQueryui timespinner example gives undefined error

I've derived this from the sample code for a timespinner at http://jqueryui.com/spinner/. I can't get it to work. <!doctype html> <html lang="en"> <head> <meta charset="utf-8">...
  • 76
3 votes
1 answer
2k views

jquery globalize: how to add the modules I need to the project

They examples and the code only mention in passing how to use only the modules you need. For example, if you need the date formatter, how do you consume it? Do you just munge it together in the same ...
5 votes
3 answers
3k views

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 ...
2 votes
2 answers
2k views

Globalize.format doesn't work for other locales or date formats

I'm relatively new to modern Javascript (I used it all the time about a decade ago) and having problems with globalize.js. Here's what I've got in head as it pertains to globalize <script src ="{%...
1 vote
1 answer
491 views

Define a Global Custom Formatter for Highcharts

We're using Highcharts to render many different charts in our web application. We have a single Formatter object which utilizes Globalize.js to format numbers, currencies and dates. Our Formatter ...
  • 1,451
13 votes
4 answers
20k views

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 ...
  • 2,812
2 votes
2 answers
21k views

Format number with jQuery Globalize

I'm trying to automatically format a number with the proper localization with Globalize. When the users inputs a numeric value I need Globalize to read it, parse it in the right format, and then ...
  • 4,552
0 votes
0 answers
116 views

Get week of year for a specific culture

Is it possible to get week of the year in some way using Globalize?
  • 101k
4 votes
3 answers
5k views

Jquery datapicker localization using globalize plugin

Is it possible localize jquery datapicker using globalize plugin (https://github.com/jquery/globalize)? I tried in this way // get a date format var dt = Globalize.culture().calendar.patterns.d; $('...
  • 1,554