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
1
vote
2 answers

Usage of globalize format

I have confused about globalize format d. What is the usage of Globalize.format(new Date(), 'd'). it returns the current date with label format as month/date/year..
Akbar Basha
  • 1,168
  • 1
  • 16
  • 38
1
vote
1 answer

jquery/globalize custom formatter issue

When trying to format a valid ICU message 'Your open ticket count is {n, number}' jquery/globalize throw an exception: fmt is not defined(…) The message is compiled without an error with globalize-compiler but fail at runtime. Using…
Jason
  • 13
  • 2
1
vote
1 answer

Currency Formatting using Globalize js for different countries

I am using globalize.js for currency formatting for different countries. Using this link I am able to achieve for USD, but I need USD and JPY or for any country. I followed all the tutorials mentioned in the globalize. Please anyone help me to solve…
user3446501
  • 31
  • 1
  • 6
1
vote
2 answers

Better solution than Globalize.currencyParser?

I am using Globalize for jQuery and am searching for a solution to convert number with currency to a number without the currency symbol. Globalize has a function Globalize.currencyParser, but in v1.1.1 its still empty, so I tried to convert…
oezix
  • 109
  • 1
  • 4
1
vote
2 answers

Format a moment.js + timezone with jquery globalize

I use moment.js + timezone to work with date and time objects and with globalize to display numbers, currencies etc. to the user. Now I'd like to print a moment.js Date with globalize, so my first approach was to just use the to getDate()-function…
1
vote
1 answer

jquery globalize convert bulgerian shortdate pattern date string to date object

I have bulgarian short date pattern string from calendar control how can I create date object without removing 'г.' from it. new Date('26.6.2015 г.') I wanted to compare the date selected from calender with today's date if…
0
votes
1 answer

The value is not valid for double/decimal

Hello, I've been trying to get this to work for ages now and I've ran out of options. No matter what I try, the value for a double/decimal is always invalid according to the Jquery validator. This is a list of what I tried: Set culture in…
0
votes
0 answers

globalize check number or date

I have defined a function where I am receiving a value in the function that I know it should be a number and I am using the following code less = Globalize.numberParser()(value); Now I want to use the same function for dates. Is there a function…
Dan
  • 683
  • 2
  • 8
  • 24
0
votes
1 answer

Can globalize-compiler expose CLDR data too?

I am using globalize-compiler to statically load Globalize 1.3.0 and CLDR data. However, I would like to also consume some of the CLDR data directly, for example, to access the value of numbers/symbols-numberSystem-latn/decimal like in Globalize…
kiewic
  • 15,852
  • 13
  • 78
  • 101
0
votes
0 answers

Where in my meteor project do I instantiate Globalize

Stack: Meteor, React, Redux, React Router Question: Where (i.e. in which file) do I instantiate Globalize? I am no expert on Globalize, but it feels like this is a somewhat global variable. So where does it go? More generally speaking I am a bit…
Fabian Bosler
  • 2,310
  • 2
  • 29
  • 49
0
votes
2 answers

MVC: Date in Chrome-browser

The problem: I want to show a date in german-format with globalize. With the solution mentioned in MVc 5 - validation german date with unobtrusiv js - a simple approach it works in IE and Firefox - no Problem. But Google-Chrome uses the input-type…
PBum
  • 123
  • 10
0
votes
2 answers

MVC 5, globalize, validate german date: How to bundle the js-scripts?

In the answer to this question (MVC 5 - can not get globalisation running) I solve the problem with a bunch of "
0
votes
1 answer

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 "jquery-globalize" to the project. Now I am not…
0
votes
1 answer

How to use globalizejs in angular 2

Would anyone have an example of using globalizejs lib in Angular installation and usage? I'm developing in Angular 4 with Angular-cli and devextreme It is not very clear at devextreme about the use of globalizejs with angular
0
votes
1 answer

How to remove currency symbol, when formatting currency using Globalizejs library?

I am using Globalizejs to format Currency based on Logged-In user details in my application. I don't want currency Symbol to be displayed when formatting is done using below code snippet: Globalize.locale( "en" ); currencyFormatter =…
Neeraj Jain
  • 7,643
  • 6
  • 34
  • 62