I have this currency list (from https://openexchangerates.org)
{"AED":3.6729,"AFN":57.82755,"ALL":103.465001,"AMD":414.905,"ANG":1.787,"AOA":97.659999,"ARS":8.131418,"AUD":1.065732,"AWG":1.79,"AZN":0.7839,"BAM":1.445344,"BBD":2,"BDT":77.618221,"BGN":1.44457,"BHD":0.376997,"BIF":1553.3484,"BMD":1,"BND":1.25077,"BOB":6.90997,"BRL":2.2253,"BSD":1,"BTC":0.0016610606,"BTN":60.00055,"BWP":8.865137,"BYR":10173.333333,"BZD":1.99474,"CAD":1.087393,"CDF":926.513333,"CHF":0.899613,"CLF":0.0232,"CLP":556.539996,"CNY":6.210708,"COP":1880.283333,"CRC":556.712998,"CUP":0.9999,"CVE":81.0433,"CZK":20.26093,"DJF":178.380299,"DKK":5.507907,"DOP":43.27396,"DZD":79.3989,"EEK":11.68855,"EGP":7.150895,"ERN":14.952575,"ETB":19.57954,"EUR":0.738639,"FJD":1.825871,"FKP":0.589387,"GBP":0.589387,"GEL":1.76713,"GHS":3.09659,"GIP":0.589387,"GMD":39.6,"GNF":6961.666667,"GTQ":7.81589,"GYD":204.983752,"HKD":7.751421,"HNL":20.82528,"HRK":5.59851,"HTG":45.02112,"HUF":227.0625,"IDR":11812.583333,"ILS":3.458559,"INR":60.06054,"IQD":1177.766717,"IRR":25566,"ISK":114.098,"JEP":0.589387,"JMD":111.226,"JOD":0.70829,"JPY":101.8811,"KES":87.971741,"KGS":51.94185,"KHR":4041.333333,"KMF":363.47686,"KPW":900,"KRW":1019.49,"KWD":0.282206,"KYD":0.826662,"KZT":183.533001,"LAK":8052.216667,"LBP":1511.808333,"LKR":130.250001,"LRD":89.001533,"LSL":10.70319,"LTL":2.5504,"LVL":0.518188,"LYD":1.2312,"MAD":8.27075,"MDL":13.90944,"MGA":2410.6,"MKD":45.37356,"MMK":970.664,"MNT":1823.17334,"MOP":7.98312,"MRO":290.925,"MTL":0.683738,"MUR":30.34428,"MVR":15.45622,"MWK":394.397,"MXN":13.03642,"MYR":3.2241,"MZN":31.50475,"NAD":10.70799,"NGN":163.182999,"NIO":25.87152,"NOK":5.997004,"NPR":96.1525,"NZD":1.152707,"OMR":0.384962,"PAB":1,"PEN":2.7912,"PGK":2.448173,"PHP":43.90592,"PKR":98.54584,"PLN":3.057794,"PYG":4412.258268,"QAR":3.64089,"RON":3.24691,"RSD":85.24262,"RUB":34.58522,"RWF":682.30402,"SAR":3.75081,"SBD":7.2208,"SCR":12.25984,"SDG":5.694417,"SEK":6.645576,"SGD":1.25099,"SHP":0.589387,"SLL":4335,"SOS":936.00202,"SRD":3.308567,"STD":18107.5,"SVC":8.74892,"SYP":149.324999,"SZL":10.73045,"THB":32.35748,"TJS":4.923975,"TMT":2.85,"TND":1.66316,"TOP":1.854405,"TRY":2.135726,"TTD":6.43465,"TWD":30.02066,"TZS":1685.116667,"UAH":11.8597,"UGX":2569.95,"USD":1,"UYU":22.98366,"UZS":2305.953311,"VEF":6.292275,"VND":21206,"VUV":94.252501,"WST":2.298934,"XAF":484.799008,"XAG":0.05081723,"XAU":0.00078076,"XCD":2.70158,"XDR":0.649354,"XOF":485.16402,"XPF":88.20458,"YER":214.986999,"ZAR":10.71995,"ZMK":5252.024745,"ZMW":6.284713,"ZWL":322.355006}
and know I want to add for each currency the correct currency sign and the currency name (in the native Language).
Does anybody know a currency-signs-list like that
$
';€
';£
';I'm not sure, exist for every currency a sign in "HTML encoding (numeric)"?
Is it (in general) possible to store the native currency name in a normal JS object?
Thanks in advance.
Symbol PlacementIn the US, we're used to the dollar symbol being to the left of the dollar amount. But currency symbol placement changes based on geographic location. For example, countries in the European Union place the euro symbol to the right of the dollar amount.
The names (in English) of currencies supported by openexchangerates.org are available at http://openexchangerates.org/api/currencies.json -
{
"AED": "United Arab Emirates Dirham",
"AFN": "Afghan Afghani",
"ALL": "Albanian Lek",
/* ... */
"ZMK": "Zambian Kwacha (pre-2013)",
"ZMW": "Zambian Kwacha",
"ZWL": "Zimbabwean Dollar"
}
The symbols for currencies supported by openexchangerates.org do not appear to be provided by the service itself. However, a JSON document containing the symbols (and other information) for most of the currencies supported by openexchangerates.com (124 out of 168 currencies) is available at https://gist.github.com/Fluidbyte/2973986 -
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
/* ... */
"AFN": {
"symbol": "Af",
"name": "Afghan Afghani",
"symbol_native": "؋",
"decimal_digits": 0,
"rounding": 0,
"code": "AFN",
"name_plural": "Afghan Afghanis"
},
/* ... */
"ZMK": {
"symbol": "ZK",
"name": "Zambian Kwacha",
"symbol_native": "ZK",
"decimal_digits": 0,
"rounding": 0,
"code": "ZMK",
"name_plural": "Zambian kwachas"
}
}
If necessary, the Unicode characters in this document could be converted to HTML Entity Reference escaped strings using the information at How to convert characters to HTML entities using plain JavaScript.
Q: Is it (in general) possible to store the native currency name in a normal JS object?
While you can obviously store any string you like in an object, the idea of a singular name of a currency in its singular native language doesn't really make sense.
There is no singular native language, for example, for:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With