@piotrgorecki/i18n-currency-name
v1.3.0
Published
Translate currency code (ISO 4217) to localized currency name.
Downloads
3,294
Readme
i18n-currency-name
Translates the currency code (ISO 4217) to the localized currency name.
Install
$ npm install @piotrgorecki/i18n-currency-name
$ yarn add @piotrgorecki/i18n-currency-name
Usage
var currencyToName = require("@piotrgorecki/i18n-currency-name");
currencyToName("USD", "de") // "Dollar"
currencyToName("USD", "en") // "US Dollar"
currencyToName("USD", "es") // "Dólar estadounidense"
currencyToName("USD", "pl") // "Dolar Amerykański"
currencyToName("XYZ", "en") // undefined
currencyToName("USD", "xyz") // undefined
Supported locals
["da", "de", "el", "en", "es", "fi", "fr", "it", "ja", "ko", "lt", "nb", "pl", "pt", "ro", "sv", "tr", "ua", "ur", "zh"]