wvmoreira / jquery-numberformatter

Automatically exported from code.google.com/p/jquery-numberformatter
0 stars 0 forks source link

Patch for /tags/1.2.2/src/jquery.numberformatter.js #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Line 139-140. To prevent locale format like : "fr_FR", "en_US", "de_DE", 
"fr_FR", "en-US", "de-DE".

Original issue reported on code.google.com by midtown...@gmail.com on 26 Sep 2011 at 4:11

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for bringing this to my attention. Have modified the patch slightly and 
merged into 1.2.3, I should probably be calling that variable country rather 
than locale. Strictly speaking it should be by language I think though.

Now is -

// Extract and convert to lower-case any country code from a real 'locale' 
formatted string, if not use as-is
// (To prevent locale format like : "fr_FR", "en_US", "de_DE", "fr_FR", 
"en-US", "de-DE")
if (locale.indexOf('_') != -1)
   locale = locale.split('_')[1].toLowerCase();
else if (locale.indexOf('-') != -1)
   locale = locale.split('-')[1].toLowerCase();

In order to properly handle non locale formatted strings also and ensure all 
are lower-case.

I will try and bring full locale support to a future release.

Original comment by apar...@gmail.com on 5 Feb 2012 at 2:45

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r19.

Original comment by apar...@gmail.com on 5 Feb 2012 at 2:46