Locale Currency

Categories

Component ID

1114150

Component name

Locale Currency

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

2073

Component created

Component changed

Component body

This simple module allows you to associate a currency codes with your site locales. To use it, simply visit Site configuration -> Languages (/admin/settings/language/overview), and edit each of your locales. With this module enabled, you will see a new field entitled 'currency' which you can use to define the currency using an ISO 4217 compliant currency identifier. Examples: "GBP", "EUR", and "USD".

This module alters the core languages database table, adding an additional column named currency. This ensures that the currency data will always be loaded along with $language objects without any additional overhead. A convenience function locale_currency_get_currency() enables you to quickly find out the currency code associated with a particular locale.

Code examples

global $language;
print 'Current currency is: '.$language->currency;

$french_currency = locale_currency_get_currency('fr');
print 'French currency is: '.$french_currency->currency;

Customisations

Locale Currency is being developed by Tom Kirkpatrick (mrfelton) of SystemSeed. The author may be contacted for paid customisations of this module, Drupal consultation or other Drupal-related projects.

How can you get involved?

* Write a review for this module on drupalmodules.com.
* Report any bugs, feature requests, etc. in the issue tracker.
* Contact the maintainer with any comments, questions, or a quote for custom module customisations.