Questions tagged [jquery-globalize]

A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data.

About Globalize

Why globalization?

Each language, and the countries that speak that language, have different expectations when it comes to how numbers (including currency and percentages) and dates should appear. Obviously, each language has different names for the days of the week and the months of the year. But they also have different expectations for the structure of dates, such as what order the day, month and year are in. In number formatting, not only does the character used to delineate number groupings and the decimal portion differ, but the placement of those characters differ as well.

A user using an application should be able to read and write dates and numbers in the format they are accustomed to. This library makes this possible, providing an API to convert user-entered number and date strings - in their own format - into actual numbers and dates, and conversely, to format numbers and dates into that string format.

Even if the application deals only with the English locale, it may still need globalization to format programming language bytes into human-understandable language and vice-versa in an effective and reasonable way. For example, to display something better than "Edited 1 minutes ago".

Why Globalize?

Globalize provides number formatting and parsing, date and time formatting and parsing, currency formatting, message formatting (ICU message format pattern), and plural support.

57 questions
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,751
  • 2
  • 22
  • 39
5
votes
1 answer

Django i18n along side jQuery Globalize's messages for a single page application

I have a Django based API layer which internally uses Django's i18n facilities (ugettext etc.) to provide translations to some outputs. The API feeds a single page Javascript application which makes use of jQuery's Globalize and its own messaging…
4
votes
1 answer

How to use Globalize.js to configure culture for client side validation in ASP.NET Core MVC

I having very hard time to configure client side validation in my app. I would like to it be able to accept localized pt-BR inputs. I tried configure the app using at startup: var locale = "pt-BR"; RequestLocalizationOptions localizationOptions =…
Daniel Santos
  • 8,957
  • 15
  • 65
  • 139
4
votes
1 answer

Integrate jquery-globalize into an ASP.NET Core MVC App

In this tutorial : Building your first ASP.NET Core MVC app with Visual Studio the purpose is to build a simple movie application. At step Adding a model there is this note below : Note You may not be able to enter decimal points or commas in the…
Jolan75
  • 41
  • 4
3
votes
0 answers

Globalize.js with MVC - missing locale

I'm trying to get the Globalize.js library to work under an ASP.NET MVC 5 application + unobstrusive validation. Specifically, I have most of the libraries and requirements working as per the post https://stackoverflow.com/a/25289555/1838819.…
DiskJunky
  • 4,320
  • 3
  • 30
  • 60
3
votes
2 answers

Bug hunt: CLDR 30 JSON data no longer has currencySpacing information

We've been using jquery/globalize in our web application with the CLDR 29 data in JSON format without any problems. Just recently, Unicode released CLDR 30 (and shortly after, version 30.0.1 with some fixes). When we upgrade to the CLDR 30(.0.1)…
sammy34
  • 5,212
  • 4
  • 25
  • 34
3
votes
2 answers

Globalize.js vs i18next.js

Does Globalize.js offer anything over i18next.js? I've been using i18next.js and I can't find a comparison of the two technologies. Are there any advantages to one over the other? Or, is this just another jQuery project sold on the jQuery name?
user157251
  • 64,489
  • 38
  • 208
  • 350
3
votes
0 answers

Configure globalize.js to use CLDR for validating decimal numbers

I need to validate decimal numbers in the Serbian culture (a decimal separator is comma instead of a dot). I am looking on the internet to find a solution and most posts suggest to use globalize.js. But I can set it up to work for me. Here is…
Igor
  • 371
  • 3
  • 16
3
votes
1 answer

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 manager. Module system: AMD On application startup,…
3
votes
1 answer

Jquery Globalize setup using plain javascript - uncaught error

I am trying to setup jquery globalize using the js/json setup suggested (for date module), using a javascript example suggested here. In this code I am trying to set it up and the use it to format the jquery-ui datepicker: (function () { $(function…
Chris Tsavas
  • 33
  • 1
  • 5
2
votes
2 answers

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 is not a function I don't know where should I get…
2
votes
1 answer

crazy problems with globalize.js

Ive spent the best part of a day just trying to get date validation to work with globalize.js. its proving to be a nightmare for something that should be quite simple. After much searching I found that i needed these files included and in a…
proteus
  • 435
  • 1
  • 10
  • 27
2
votes
2 answers

Using globalize with webpack 2 and typescript

I am trying to use the Globalize library with webpack 2 in a TypeScript project. The typescript/Webpack 2 setup already works, however, when importing and accessing Globalize, I am getting the following error message when running webpack: ERROR in…
Dominic
  • 2,863
  • 2
  • 18
  • 34
2
votes
0 answers

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 add the CLDR data. And we discovered that loading…
Stéphane Goetz
  • 682
  • 1
  • 6
  • 16
2
votes
1 answer

CLDR/Globalize: slice JSON array: Uncaught TypeError: Cannot read property '0' of undefined

We are trying to use cldr/globalize; an exception is triggered while loading 13 CLDR' json files (like likelySubtags.json). It seems that the size of the 'arguments' is 14 (instead of 13) which triggers the exception "Uncaught TypeError: Cannot…
Abdelkrim
  • 1,750
  • 3
  • 22
  • 34
1
2 3 4