Questions tagged [jquery-globalization]

jQuery/Globalize (former jquery-global) is a library for the globalization of strings, dates, and numbers/currencies formatting and parsing for different cultures in JavaScript. It enables you to add globalization support to your JavaScript applications. This plugin includes globalization information for over 350 cultures ranging from Scottish Gaelic, Frisian, Hungarian, Japanese, to Canadian English. It's released to the community as open-source.

Globalize (from the jQuery team) is a JavaScript library for internationalization and localization that leverage the official Unicode CLDR JSON data. It started as jQuery plugin named jquery-global, but now it has no dependancy on jQuery. The library works both for the browser and as a Node.js module.

It enables complex culture-aware number and date parsing and formatting, including the raw culture information for hundreds of different languages and countries, as well as an extensible system for localization.

Features

  1. Supports over 350 different cultures, including country-specific cultures and language, country-neutral cultures.

  2. Culture information for each culture is available through a simple data structure, accessible to plugins for their own purposes.

  3. Supports formatting dates to any of these cultures, including those that have non-Gregorian calendars, Gregorian calendars with a year offset, and calendars with multiple Eras.

  4. Supports formatting numbers to strings as numbers, currency, or percentages, to any of these cultures, including those with very special formatting rules, such as number group sizes that differ between currency and percentages, or have a different number of digits.

  5. Supports parsing dates and numbers from the culture specific string representation of them back into JavaScript dates and numbers.

  6. Supports localization through a localize() API that handles selecting the best known match automatically.

  7. Supports the Accept-Language header value as-is, to select the culture best suited to the user per their browser settings.

  8. Extensibility allows for plugins to access and add to the culture information, including cultures it does not already support.

  9. Retrofitted the jQueryUI DatePicker plugin to use this plugin, rather than its existing globalization support. This was fairly simple to do and immediately opens up the range of cultures supported by the plugin to the full set of cultures supported by jQuery.glob.js.

Links

https://github.com/jquery/globalize
Read Me
jQuery Globalization Plugin from Microsoft
Exploring Globalization with jQuery
Proposal for a globalization plugin: jQuery.glob.js

43 questions
0
votes
1 answer

How to change the CurrentCulture with jquery

I have a jquery function that detects changing items from dropdown List I want to change the CurrentCulture using jquery in order to change LocalizatedValue in .net core , that's the jquery method containing my trial version $('#dropdownList…
0
votes
1 answer

jQuery UI Slider and jQuery Globalization with value delimited by comma [ , ]

I'm developing an ASP.NET MVC 3 app that uses both jQuery Globalization and jQuery UI Slider. I'm localizing this app to Portuguese from Brazil (pt-BR) and it also supports English. The problem is that when I change the language to Portuguese, all…
0
votes
1 answer

How to get a weekday in Globalize?

In my project, I am using Globalize 1.1.1. It has the globalize for weekday in this path "dates/calendars/gregorian/days", I don't know how to get a specific day. Like I want to get the Globalize for "Thuesday", the field is called "thu". So my…
0
votes
0 answers

How improve the number formatting dynamics in a html form

Up to now, in our application, we are dealing with formatting numbers in forms in a quite classical way. We are using jquery and its plugin globalization. If the user select an input element with a specific class (that represents the format type)…
0
votes
1 answer

Non-gregorian calendars and Globalize.js

Are non-Gregorian calendars currently supported in Globalize.js? If so, how can I convert, let's say, today's date, into a Hijri calendar equivalent? For example, right now when I try this: Globalize.locale("ar-eg"); var arDate = …
0
votes
2 answers

Globalize.js not formating the date only in German culture

I have used Globalize.js to localize and format the date. it all works fine in different culture, but not working properly in German culture (de-DE). Code i have used to format. Globalize.format(new Date(), "MM/yy/dd","de-DE"); it returns…
0
votes
2 answers

JqueryUI spinner numberformat currency submit number value

I have a jquery currency input and I am using this code: $('input[name="precio"]').spinner({ min:0, numberFormat: 'C' }); The input works perfectly as it shows the number as a number with the $ or € sign depending on globalize. The problem…
0
votes
1 answer

How to use Globalize.js to change the date format that validation uses?

I have the globalize.js file, and I want to force the dateformat to dd/mm/yyyy at a global level somewhere so then all jquery validation and datepicker etc. will pickup this dateformat. Is this possible?
loyalflow
  • 14,275
  • 27
  • 107
  • 168
0
votes
1 answer

Jquery Globalization

I am using MVC4.0 and Jquery globalization plugin from Microsift "http://www.scottgu.com/blogposts/jQueryGlobalizationDemos.zip" which i got from "http://weblogs.asp.net/scottgu/archive/2010/06/10/jquery-globalization-plugin-from-microsoft.aspx".…
Vikas Pawar
  • 135
  • 1
  • 2
  • 11
0
votes
2 answers

jQuery Globalize plugin - get localized format/change format - not working as expected

I am trying to convert a float from one culture to another, and seems nothing i found online was working for me. The problem is: I have a parameter coming from external resource (web service) in a specific culture. the result is send to an MVC…
d.popov
  • 4,175
  • 1
  • 36
  • 47
0
votes
1 answer

Convert to string is removing single quote from the date format

I am trying to convert date in different format. I am facing difficulties for Bulgarian format. When I am taking shortdate format and long time format it is giving two symbols in single quotes. But when I am trying to convert it directly to string…
kunjee
  • 2,739
  • 1
  • 23
  • 38
0
votes
1 answer

Converting Hijri date to gregorian with jQuery Globalize

I am trying to convert a Hijri date back to Gregorian with the internal function in the ar-SA calendar (other calendars seem to have the same toGregorian function). For example code…
Tim
  • 3,576
  • 6
  • 44
  • 58
0
votes
3 answers

Globalization issue with Calendar Date

How to handle dates with different cultures i.e how can i use common javascript code to handle dates for all cultures. For example - Globalize.culture( "en" ); Globalize.parseDate( "1/2/2003" ); // Thu Jan 02 2003 Globalize.culture( "fr"…
Kapil
  • 9
  • 4
1 2
3