currency list with currency signs and currency name in native language
Asked Answered
R

3

7

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

  • USD = '$';
  • EUR = '€';
  • GBP = '£';

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.

Roily answered 17/6, 2014 at 4:40 Comment(3)
fileformat.info/info/unicode/category/Sc/list.htm, xe.com/symbols.phpSafety
“Is it (in general) possible to store the native currency name in a normal JS object?” — why wouldn’t it be?Safety
Sidenote: Acquiring an unabridged list of currencies, supported within a particular js environment, is unnecessarily tedious and inefficient (due to the spec not inherently providing a list function in the API).Tanked
D
14

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:

  • The Euro: official currency of eighteen separate countries, with many distinct native languages between them.
  • The Indian rupee: official currency of India, which has no national language, two official languages, 22 "scheduled" or legally recognised languages, and many more languages without official recognition.
Dropout answered 24/6, 2014 at 3:56 Comment(0)
S
1

Full JSON sample

"currency": { "AED": "United Arab Emirates dirham", "AFN": "Afghan afghani", "ALL": "Albanian lek", "AMD": "Armenian dram", "ANG": "Netherlands Antillean guilder", "AOA": "Angolan kwanza", "ARS": "Argentine peso", "AUD": "Australian dollar", "AWG": "Aruban florin", "AZN": "Azerbaijani manat", "BAM": "Bosnia and Herzegovina convertible mark", "BBD": "Barbados dollar", "BDT": "Bangladeshi taka", "BGN": "Bulgarian lev", "BHD": "Bahraini dinar", "BIF": "Burundian franc", "BMD": "Bermudian dollar", "BND": "Brunei dollar", "BOB": "Boliviano", "BRL": "Brazilian real", "BSD": "Bahamian dollar", "BTN": "Bhutanese ngultrum", "BWP": "Botswana pula", "BYN": "New Belarusian ruble", "BYR": "Belarusian ruble", "BZD": "Belize dollar", "CAD": "Canadian dollar", "CDF": "Congolese franc", "CHF": "Swiss franc", "CLF": "Unidad de Fomento", "CLP": "Chilean peso", "CNY": "Renminbi|Chinese yuan", "COP": "Colombian peso", "CRC": "Costa Rican colon", "CUC": "Cuban convertible peso", "CUP": "Cuban peso", "CVE": "Cape Verde escudo", "CZK": "Czech koruna", "DJF": "Djiboutian franc", "DKK": "Danish krone", "DOP": "Dominican peso", "DZD": "Algerian dinar", "EGP": "Egyptian pound", "ERN": "Eritrean nakfa", "ETB": "Ethiopian birr", "EUR": "Euro", "FJD": "Fiji dollar", "FKP": "Falkland Islands pound", "GBP": "Pound sterling", "GEL": "Georgian lari", "GHS": "Ghanaian cedi", "GIP": "Gibraltar pound", "GMD": "Gambian dalasi", "GNF": "Guinean franc", "GTQ": "Guatemalan quetzal", "GYD": "Guyanese dollar", "HKD": "Hong Kong dollar", "HNL": "Honduran lempira", "HRK": "Croatian kuna", "HTG": "Haitian gourde", "HUF": "Hungarian forint", "IDR": "Indonesian rupiah", "ILS": "Israeli new shekel", "INR": "Indian rupee", "IQD": "Iraqi dinar", "IRR": "Iranian rial", "ISK": "Icelandic króna", "JMD": "Jamaican dollar", "JOD": "Jordanian dinar", "JPY": "Japanese yen", "KES": "Kenyan shilling", "KGS": "Kyrgyzstani som", "KHR": "Cambodian riel", "KMF": "Comoro franc", "KPW": "North Korean won", "KRW": "South Korean won", "KWD": "Kuwaiti dinar", "KYD": "Cayman Islands dollar", "KZT": "Kazakhstani tenge", "LAK": "Lao kip", "LBP": "Lebanese pound", "LKR": "Sri Lankan rupee", "LRD": "Liberian dollar", "LSL": "Lesotho loti", "LYD": "Libyan dinar", "MAD": "Moroccan dirham", "MDL": "Moldovan leu", "MGA": "Malagasy ariary", "MKD": "Macedonian denar", "MMK": "Myanmar kyat", "MNT": "Mongolian tögrög", "MOP": "Macanese pataca", "MRO": "Mauritanian ouguiya", "MUR": "Mauritian rupee", "MVR": "Maldivian rufiyaa", "MWK": "Malawian kwacha", "MXN": "Mexican peso", "MXV": "Mexican Unidad de Inversion", "MYR": "Malaysian ringgit", "MZN": "Mozambican metical", "NAD": "Namibian dollar", "NGN": "Nigerian naira", "NIO": "Nicaraguan córdoba", "NOK": "Norwegian krone", "NPR": "Nepalese rupee", "NZD": "New Zealand dollar", "OMR": "Omani rial", "PAB": "Panamanian balboa", "PEN": "Peruvian Sol", "PGK": "Papua New Guinean kina", "PHP": "Philippine peso", "PKR": "Pakistani rupee", "PLN": "Polish złoty", "PYG": "Paraguayan guaraní", "QAR": "Qatari riyal", "RON": "Romanian leu", "RSD": "Serbian dinar", "RUB": "Russian ruble", "RWF": "Rwandan franc", "SAR": "Saudi riyal", "SBD": "Solomon Islands dollar", "SCR": "Seychelles rupee", "SDG": "Sudanese pound", "SEK": "Swedish krona", "SGD": "Singapore dollar", "SHP": "Saint Helena pound", "SLL": "Sierra Leonean leone", "SOS": "Somali shilling", "SRD": "Surinamese dollar", "SSP": "South Sudanese pound", "STD": "São Tomé and Príncipe dobra", "SVC": "Salvadoran colón", "SYP": "Syrian pound", "SZL": "Swazi lilangeni", "THB": "Thai baht", "TJS": "Tajikistani somoni", "TMT": "Turkmenistani manat", "TND": "Tunisian dinar", "TOP": "Tongan paʻanga", "TRY": "Turkish lira", "TTD": "Trinidad and Tobago dollar", "TWD": "New Taiwan dollar", "TZS": "Tanzanian shilling", "UAH": "Ukrainian hryvnia", "UGX": "Ugandan shilling", "USD": "United States dollar", "UYI": "Uruguay Peso en Unidades Indexadas", "UYU": "Uruguayan peso", "UZS": "Uzbekistan som", "VEF": "Venezuelan bolívar", "VND": "Vietnamese đồng", "VUV": "Vanuatu vatu", "WST": "Samoan tala", "XAF": "Central African CFA franc", "XCD": "East Caribbean dollar", "XOF": "West African CFA franc", "XPF": "CFP franc", "XXX": "No currency", "YER": "Yemeni rial", "ZAR": "South African rand", "ZMW": "Zambian kwacha", "ZWL": "Zimbabwean dollar" }
Succor answered 18/8, 2019 at 21:53 Comment(0)
S
1

check out this json file

https://github.com/mansourcodes/country-databases/blob/main/currency-details.json

{
    "USD": {
        "symbol": "$",
        "name": "US Dollar",
        "symbol_native": "$",
        "decimal_digits": 2,
        "rounding": 0,
        "code": "USD",
        "name_plural": "US dollars"
    },
    "CAD": {
        "symbol": "CA$",
        "name": "Canadian Dollar",
        "symbol_native": "$",
        "decimal_digits": 2,
        "rounding": 0,
        "code": "CAD",
        "name_plural": "Canadian dollars"
....

Steadfast answered 23/4, 2021 at 19:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.