Closed (fixed)
Project:
Currency
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Nov 2012 at 16:41 UTC
Updated:
24 Jul 2013 at 08:46 UTC
Jump to comment: Most recent file
Comments
Comment #1
xanoPreliminary patch. Depends on #1531058: Include bartfeenstra/cldr to parse Unicode CLDR number patterns.
Comment #2
xanoComment #3
xanoThis patch depends on #1868952: Update bartfeenstra/cldr.
This patch adds:
- Currency locale patterns that are a combination of locale information and a CLDR number pattern.
- Methods to format amounts using a locale pattern:
CurrencyLocaleFormat::format()andCurrency::format().- A delegator to load the right pattern based on environment variables. It tries
global $language->currency_country_codefirst, thenvariable_get('site_default_country'), both in combination withglobal $language->language. If these fail, then it loads the pattern for en_US (which is predefined and is consistent with Drupal's default language).- Tests!
Comment #5
xanoThat weight property shouldn't be there.
Comment #6
xano#3: currency_1848030_01.patch queued for re-testing.
Comment #7
xano#3: currency_1848030_01.patch queued for re-testing.
Comment #9
amateescu commented#3: currency_1848030_01.patch queued for re-testing.
Comment #11
xanoYeah, working on this as we speak. Will probably finish it tomorrow as it's already late.
Comment #12
xanoComment #13
xanoFYI: I'll ad a follow-up issue to expand the list of number patterns for locale based on CLDR data. This means that if we commit this patch now, we can continue with at least three other issues that depend on this API, but not on specific number patterns being available.
Comment #14
amateescu commentedDone! Committed to 7.x-2.x.
Comment #16
xano