Module:Currency/Presentation: Difference between revisions
Appearance
Content deleted Content added
update |
No edit summary |
||
Line 88: | Line 88: | ||
['HRK'] = {page = '', plural = '', position = 'bs', symbol = 'HRK'}, |
['HRK'] = {page = '', plural = '', position = 'bs', symbol = 'HRK'}, |
||
['HTG'] = {page = '', plural = '', position = '', symbol = ''}, |
['HTG'] = {page = '', plural = '', position = '', symbol = ''}, |
||
['HUF'] = {page = 'Hungarian forint', plural = ' |
['HUF'] = {page = 'Hungarian forint', plural = '', position = 'as', symbol = 'Ft'}, |
||
['IDR'] = {page = '', plural = '', position = 'bs', symbol = 'Rp'}, |
['IDR'] = {page = 'Indonesian rupiah', plural = '', position = 'bs', symbol = 'Rp'}, |
||
['ILS'] = {page = 'Israeli new shekel', plural = 's', position = 'b', symbol = '₪'}, |
['ILS'] = {page = 'Israeli new shekel', plural = 's', position = 'b', symbol = '₪'}, |
||
['INR'] = {page = 'Indian rupee', plural = 's', position = 'b', symbol = ' |
['INR'] = {page = 'Indian rupee', plural = 's', position = 'b', symbol = '\226\130\185'}, -- U+20B9 ₹ |
||
['IQD'] = {page = '', plural = '', position = '', symbol = ''}, |
['IQD'] = {page = 'Iraqi dinar', plural = 's', position = 'bs', symbol = '<bdi lang="ar">د.ع</bdi>'}, |
||
['IRR'] = {page = 'Iranian rial', plural = 's', position = 'b', symbol = ' |
['IRR'] = {page = 'Iranian rial', plural = 's', position = 'b', symbol = '\239\183\188'}, -- U+FDFC ﷼ |
||
['ISK'] = {page = 'Icelandic króna', plural = ' |
['ISK'] = {page = 'Icelandic króna', plural = 'Icelandic krónur', position = 'bs', symbol = 'Íkr'}, |
||
['JMD'] = {page = '', plural = '', position = '', symbol = ''}, |
['JMD'] = {page = '', plural = '', position = '', symbol = ''}, |
||
['JOD'] = {page = '', plural = '', position = '', symbol = ''}, |
['JOD'] = {page = '', plural = '', position = '', symbol = ''}, |
Revision as of 13:31, 8 April 2016
![]() | This Lua module is used on approximately 4,200 pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
Data used by Module:Currency
local presentation = {}; -- table of tables that define presentation properties
--[=[-------------------------< C U R R E N C Y P R O P E R T I E S >----------------------------------------
this table is created from Template:Currency/Page, Template:Currency/Position, and Template:Currency/Symbol. The
individual currency codes are taken from the table at [[ISO 4217]]. The source templates have other codes not
conforming to 4217; those codes are not included here but are listed in the translation table or in the non-standard
table.
Meanings of the table entries:
['???'] – ISO 4217 currency code; uppercase only
page = '' – Wikipedia article name approriate to the currency code
plural = '' – specifies how to make the currency page name plural:
if singular and plural forms are the same leave empty
if adding an 's' to the end of the singular name makes it plural then set plural = 's'
if the plural name is different, set the whole plural name (see GBP for example)
position = '' – identifies where the symbol is placed relative to the amount
'a' – <amount><symbol>
'as' – <amount>< ><symbol>
'b' – <symbol><amount>
'bs' – <symbol>< ><amount>
symbol = '' – the symbol associated with the currency code
]=]
local currency_properties = {
['AED'] = {page = 'United Arab Emirates dirham', plural = 's', position = 'bs', symbol = 'DH'},
['AFN'] = {page = 'Afghan afghani', plural = 's', position = 'b', symbol = '\216\139'}, -- U+060B ؋
['ALL'] = {page = 'Albanian lek', plural = 'lekë', position = 'b', symbol = 'L'},
['AMD'] = {page = 'Armenian dram', plural = 's', position = 'bs', symbol = '\214\143'}, -- U+058F ؋
['ANG'] = {page = 'Netherlands Antillean guilder', plural = 's', position = 'b', symbol = 'NAƒ'},
['AOA'] = {page = 'Angolan kwanza', plural = 's', position = 'bs', symbol = 'Kz'},
['ARS'] = {page = 'Argentine peso', plural = 's', position = 'b', symbol = 'AR$'},
['AUD'] = {page = 'Australian dollar', plural = 's', position = 'b', symbol = 'A$'},
['AWG'] = {page = 'Aruban florin', plural = 's', position = 'bs', symbol = 'Afl.'},
['AZN'] = {page = 'Azerbaijani manat', plural = 's', position = 'b', symbol = '\226\130\188'}, -- U+20BC
['BAM'] = {page = 'Bosnia and Herzegovina konvertibilna marka', plural = 's', position = 'bs', symbol = 'KM'},
['BBD'] = {page = 'Barbados dollar', plural = 's', position = 'bs', symbol = 'Bds$'},
['BDT'] = {page = 'Bangladeshi taka', plural = '', position = 'b', symbol = '৳'},
['BGN'] = {page = 'Bulgarian lev', plural = 'leva', position = 'bs', symbol = 'лв.'}, -- levove?
['BHD'] = {page = 'Bahraini dinar', plural = 's', position = 'bs', symbol = '<bdi lang="ar">.د.ب</bdi>'},
['BIF'] = {page = 'Burundian franc', plural = 's', position = 'bs', symbol = 'FBu'},
['BMD'] = {page = 'Bermudian dollar', plural = 's', position = 'b', symbol = 'BD$'},
['BND'] = {page = 'Brunei dollar', plural = 's', position = 'b', symbol = 'B$'},
['BOB'] = {page = 'Boliviano', plural = 's', position = 'bs', symbol = 'Bs.'},
['BOV'] = {page = '', plural = '', position = '', symbol = ''}, -- Bolivian Mvdol (funds code)
['BRL'] = {page = 'Brazilian real', plural = 's', position = 'b', symbol = 'R$'},
['BSD'] = {page = 'Bahamian dollar', plural = 's', position = 'b', symbol = 'B$'},
['BTN'] = {page = 'Ngultrum', plural = 's', position = 'bs', symbol = 'Nu.'},
['BWP'] = {page = 'Botswana pula', plural = '', position = 'bs', symbol = 'P'},
['BYR'] = {page = 'Belarusian ruble', plural = 's', position = 'bs', symbol = 'Br'},
['BZD'] = {page = 'Belize dollar', plural = 's', position = 'b', symbol = 'BZ$'},
['CAD'] = {page = 'Canadian dollar', plural = 's', position = 'b', symbol = 'C$'},
['CDF'] = {page = 'Congolese franc', plural = 's', position = 'bs', symbol = 'FC'},
['CHE'] = {page = '', plural = '', position = '', symbol = ''},
['CHF'] = {page = 'Swiss franc', plural = 's', position = 'bs', symbol = 'CHF'},
['CHW'] = {page = '', plural = '', position = '', symbol = ''},
['CLF'] = {page = '', plural = '', position = '', symbol = ''}, -- Unidad de Fomento (funds code) (Chile)
['CLP'] = {page = 'Colombian peso', plural = 's', position = 'b', symbol = 'CL$'},
['CNY'] = {page = 'Renminbi', plural = '', position = 'bs', symbol = 'CN¥'},
['COP'] = {page = 'Colombian peso', plural = 's', position = 'b', symbol = 'COL$'},
['COU'] = {page = '', plural = '', position = '', symbol = ''}, -- Unidad de Valor Real (UVR) (funds code) (Columbia)
['CRC'] = {page = 'Costa Rican colon', plural = 's', position = 'b', symbol = '₡'},
['CUC'] = {page = 'Cuban convertible peso', plural = 's', position = 'b', symbol = 'CUC$'},
['CUP'] = {page = 'Cuban peso', plural = 's', position = 'b', symbol = '$MN'},
['CVE'] = {page = 'Cape Verde escudo', plural = 's', position = 'd', symbol = '$'}, -- not yet supported position = 'd' replaces decimal with Cifrão ($)
['CZK'] = {page = 'Czech koruna', plural = '', position = 'as', symbol = 'Kč'},
['DJF'] = {page = 'Djiboutian franc', plural = 's', position = 'b', symbol = 'Fdj'},
['DKK'] = {page = 'Danish krone', plural = 'Danish kroner', position = 'bs', symbol = 'kr'},
['DOP'] = {page = 'Dominican peso', plural = 's', position = 'b', symbol = 'RD$'},
['DZD'] = {page = 'Algerian dinar', plural = 's', position = 'bs', symbol = '<bdi lang="ar">د.ج</bdi>'},
['EGP'] = {page = '', plural = '', position = 'bs', symbol = 'LE'},
['ERN'] = {page = '', plural = '', position = '', symbol = ''},
['ETB'] = {page = '', plural = '', position = '', symbol = ''},
['EUR'] = {page = 'Euro', plural = 's', position = 'b', symbol = '€'},
['FJD'] = {page = '', plural = '', position = '', symbol = ''},
['FKP'] = {page = '', plural = '', position = '', symbol = ''},
['GBP'] = {page = 'Pound sterling', plural = 'pounds sterling', position = 'b', symbol = 'GB£'},
['GEL'] = {page = '', plural = '', position = '', symbol = ''},
['GHS'] = {page = '', plural = '', position = 'b', symbol = ''},
['GIP'] = {page = '', plural = '', position = 'b', symbol = ''},
['GMD'] = {page = '', plural = '', position = '', symbol = ''},
['GNF'] = {page = '', plural = '', position = '', symbol = ''},
['GTQ'] = {page = '', plural = '', position = '', symbol = ''},
['GYD'] = {page = '', plural = '', position = '', symbol = ''},
['HKD'] = {page = 'Hong Kong dollar', plural = 's', position = '', symbol = 'HK$'},
['HNL'] = {page = 'Honduran lempira', plural = 's', position = 'bs', symbol = 'L'},
['HRK'] = {page = '', plural = '', position = 'bs', symbol = 'HRK'},
['HTG'] = {page = '', plural = '', position = '', symbol = ''},
['HUF'] = {page = 'Hungarian forint', plural = '', position = 'as', symbol = 'Ft'},
['IDR'] = {page = 'Indonesian rupiah', plural = '', position = 'bs', symbol = 'Rp'},
['ILS'] = {page = 'Israeli new shekel', plural = 's', position = 'b', symbol = '₪'},
['INR'] = {page = 'Indian rupee', plural = 's', position = 'b', symbol = '\226\130\185'}, -- U+20B9 ₹
['IQD'] = {page = 'Iraqi dinar', plural = 's', position = 'bs', symbol = '<bdi lang="ar">د.ع</bdi>'},
['IRR'] = {page = 'Iranian rial', plural = 's', position = 'b', symbol = '\239\183\188'}, -- U+FDFC ﷼
['ISK'] = {page = 'Icelandic króna', plural = 'Icelandic krónur', position = 'bs', symbol = 'Íkr'},
['JMD'] = {page = '', plural = '', position = '', symbol = ''},
['JOD'] = {page = '', plural = '', position = '', symbol = ''},
['JPY'] = {page = 'Japanese yen', plural = '', position = 'b', symbol = '¥'},
['KES'] = {page = 'Kenyan shilling', plural = 's', position = 'bs', symbol = 'KSh.'},
['KGS'] = {page = '', plural = '', position = '', symbol = ''},
['KHR'] = {page = 'Cambodian riel', plural = '', position = 'b', symbol = '៛'},
['KMF'] = {page = '', plural = '', position = '', symbol = ''},
['KPW'] = {page = 'North Korean won', plural = '', position = 'b', symbol = '₩'},
['KRW'] = {page = 'South Korean won', plural = '', position = 'b', symbol = '₩'},
['KWD'] = {page = '', plural = '', position = '', symbol = ''},
['KYD'] = {page = '', plural = '', position = '', symbol = ''},
['KZT'] = {page = '', plural = '', position = '', symbol = ''},
['LAK'] = {page = 'Lao kip', plural = '', position = 'b', symbol = '₭'},
['LBP'] = {page = '', plural = '', position = '', symbol = ''},
['LKR'] = {page = 'Sri Lankan rupee', plural = '', position = 'bs', symbol = 'Rs'},
['LRD'] = {page = '', plural = '', position = '', symbol = ''},
['LSL'] = {page = '', plural = '', position = '', symbol = ''},
['LYD'] = {page = '', plural = '', position = '', symbol = ''},
['MAD'] = {page = '', plural = '', position = '', symbol = ''},
['MDL'] = {page = '', plural = '', position = '', symbol = ''},
['MGA'] = {page = '', plural = '', position = '', symbol = ''},
['MKD'] = {page = '', plural = '', position = '', symbol = ''},
['MMK'] = {page = '', plural = '', position = '', symbol = ''},
['MNT'] = {page = 'Mongolian tögrög', plural = '', position = 'b', symbol = '₮'},
['MOP'] = {page = '', plural = '', position = '', symbol = ''},
['MRO'] = {page = '', plural = '', position = '', symbol = ''},
['MUR'] = {page = '', plural = '', position = '', symbol = ''},
['MVR'] = {page = '', plural = '', position = '', symbol = ''},
['MWK'] = {page = '', plural = '', position = '', symbol = ''},
['MXN'] = {page = 'Mexican peso', plural = 's', position = 'bs', symbol = 'MXN'},
['MXV'] = {page = '', plural = '', position = '', symbol = ''},
['MYR'] = {page = 'Malaysian ringgit', plural = '', position = 'bs', symbol = 'RM'},
['MZN'] = {page = '', plural = '', position = '', symbol = ''},
['NAD'] = {page = '', plural = '', position = '', symbol = ''},
['NGN'] = {page = 'Nigerian naira', plural = '', position = 'b', symbol = '₦'},
['NIO'] = {page = '', plural = '', position = '', symbol = ''},
['NOK'] = {page = 'Norwegian krone', plural = 'Norwegian kroner', position = 'bs', symbol = 'kr'},
['NPR'] = {page = 'Nepalese Rupee', plural = '', position = 'bs', symbol = 'Rs'},
['NZD'] = {page = '', plural = '', position = 'b', symbol = 'NZ$'},
['OMR'] = {page = '', plural = '', position = '', symbol = ''},
['PAB'] = {page = '', plural = '', position = '', symbol = ''},
['PEN'] = {page = '', plural = '', position = '', symbol = ''},
['PGK'] = {page = '', plural = '', position = '', symbol = ''},
['PHP'] = {page = 'Philippine peso', plural = 's', position = 'b', symbol = '₱'},
['PKR'] = {page = '', plural = '', position = '', symbol = ''},
['PLN'] = {page = '', plural = '', position = '', symbol = ''},
['PYG'] = {page = '', plural = '', position = '', symbol = ''},
['QAR'] = {page = '', plural = '', position = '', symbol = ''},
['RON'] = {page = '', plural = '', position = '', symbol = ''},
['RSD'] = {page = '', plural = '', position = '', symbol = ''},
['RUB'] = {page = 'Russian ruble', plural = 's', position = 'bs', symbol = 'PP'}, -- after Aug 1998 redenomination
['RWF'] = {page = 'Rwandan franc', plural = 's', position = 'bs', symbol = 'FRw'},
['SAR'] = {page = '', plural = '', position = 'bs', symbol = 'SAR'},
['SBD'] = {page = '', plural = '', position = '', symbol = ''},
['SCR'] = {page = '', plural = '', position = '', symbol = ''},
['SDG'] = {page = '', plural = '', position = '', symbol = ''},
['SEK'] = {page = 'Swedish krona', plural = 'Swedish kronor', position = 'bs', symbol = 'kr'},
['SGD'] = {page = 'Singapore dollar', plural = 's', position = 'b', symbol = 'S$'},
['SHP'] = {page = '', plural = '', position = '', symbol = ''},
['SLL'] = {page = '', plural = '', position = '', symbol = ''},
['SOS'] = {page = '', plural = '', position = '', symbol = ''},
['SRD'] = {page = '', plural = '', position = '', symbol = ''},
['SSP'] = {page = '', plural = '', position = '', symbol = ''},
['STD'] = {page = '', plural = '', position = '', symbol = ''},
['SYP'] = {page = '', plural = '', position = 'bs', symbol = '£S'},
['SZL'] = {page = '', plural = '', position = '', symbol = ''},
['THB'] = {page = 'Thai baht', plural = '', position = 'b', symbol = '฿'},
['TJS'] = {page = '', plural = '', position = '', symbol = ''},
['TMT'] = {page = '', plural = '', position = '', symbol = ''},
['TND'] = {page = '', plural = '', position = '', symbol = ''},
['TOP'] = {page = '', plural = '', position = '', symbol = ''},
['TRY'] = {page = 'Second Turkish lira', plural = '', position = 'b', symbol = '₺'},
['TTD'] = {page = '', plural = '', position = '', symbol = ''},
['TWD'] = {page = 'New Taiwan dollar', plural = 's', position = 'bs', symbol = 'NT$'},
['TZS'] = {page = 'Tanzanian shilling', plural = 's', position = 'bs', symbol = ''},
['UAH'] = {page = 'Ukrainian hryvnia', plural = '', position = 'b', symbol = '₴'},
['UGX'] = {page = 'Ugandan shilling', plural = 's', position = 'bs', symbol = 'USh.'},
['USD'] = {page = 'United States dollar', plural = 's', position = 'b', symbol = 'US$'},
['USN'] = {page = '', plural = '', position = '', symbol = ''},
['USS'] = {page = 'United States dollar', plural = 's', position = 'b', symbol = 'US$'},
['UYI'] = {page = '', plural = '', position = '', symbol = ''},
['UYU'] = {page = '', plural = '', position = '', symbol = ''},
['UZS'] = {page = '', plural = '', position = '', symbol = ''},
['VEF'] = {page = '', plural = '', position = '', symbol = ''},
['VND'] = {page = 'Vietnamese đồng', plural = '', position = 'b', symbol = '₫'},
['VUV'] = {page = '', plural = '', position = '', symbol = ''},
['WST'] = {page = '', plural = '', position = '', symbol = ''},
['XAF'] = {page = '', plural = '', position = '', symbol = ''},
['XAG'] = {page = '', plural = '', position = '', symbol = ''},
['XAU'] = {page = '', plural = '', position = '', symbol = ''},
['XBA'] = {page = '', plural = '', position = '', symbol = ''},
['XBB'] = {page = '', plural = '', position = '', symbol = ''},
['XBC'] = {page = '', plural = '', position = '', symbol = ''},
['XBD'] = {page = '', plural = '', position = '', symbol = ''},
['XCD'] = {page = '', plural = '', position = '', symbol = ''},
['XDR'] = {page = '', plural = '', position = '', symbol = ''},
['XFU'] = {page = '', plural = '', position = '', symbol = ''},
['XOF'] = {page = '', plural = '', position = '', symbol = ''},
['XPD'] = {page = '', plural = '', position = '', symbol = ''},
['XPF'] = {page = '', plural = '', position = '', symbol = ''},
['XPT'] = {page = '', plural = '', position = '', symbol = ''},
['XSU'] = {page = '', plural = '', position = '', symbol = ''},
['XTS'] = {page = '', plural = '', position = '', symbol = ''},
['XUA'] = {page = '', plural = '', position = '', symbol = ''},
['XXX'] = {page = '', plural = '', position = '', symbol = ''},
['YER'] = {page = '', plural = '', position = '', symbol = ''},
['ZAR'] = {page = 'South African rand', plural = '', position = 'b', symbol = 'R'},
['ZMW'] = {page = '', plural = '', position = '', symbol = ''},
}
--[[--------------------------< C O D E T R A N S L A T I O N >----------------------------------------------
This table lists some of the 'aliases' that refer to currencies listed in the properties table by their ISO 4217 codes
The form is:
['<non-standard code>'] = '<ISO 4217 code>'
]]
local code_translation = {
['EGE'] = 'EUR',
['EU'] = 'EUR',
['EUMELN'] = 'EUR',
['EURO'] = 'EUR',
['FRW'] = 'RWF',
['KNAAK'] = 'EUR',
['KSH'] = 'KES',
['NEP'] = 'NPR',
['POUND'] = 'GBP',
['POUND STERLING'] = 'GBP',
['RMB'] = 'CNY',
['TEURO'] = 'EUR',
['THE SINGLE CURRENCY'] = 'EUR',
['TSH'] = 'TZS',
['UK'] = 'GBP',
['UNITED STATES'] = 'USD',
['US'] = 'USD',
['U.S.'] = 'USD',
['USA'] = 'USD',
['USH'] = 'UGX',
['USS'] = 'USD',
}
--[[--------------------------< N O N _ S T A N D A R D _ P R O P E R T I E S >--------------------------------
Currencies from the source templates that are identified by non-standard codes and which for whatever reason don't
translate well to an existing ISO 4217 currency.
Meanings of the table entries are the same as those described for currency_properties table except:
['???'] – currency codes that are non-standard or that cannot be translated to a standard code; uppercase only
]]
local non_standard_properties = {
['BITCOIN'] = {page = 'Bitcoin', plural = 's', position = 'bs', symbol = 'BTC'},
['BTC'] = {page = 'Bitcoin', plural = 's', position = 'bs', symbol = 'BTC'},
['DKK2'] = {page = '', plural = '', position = 'bs', symbol = 'DKK'},
['NOK2'] = {page = 'Norwegian krone', plural = 'Norwegian kroner', position = 'bs', symbol = 'NOK'},
['SEK2'] = {page = 'Swedish krona', plural = 'Swedish kronor', position = 'bs', symbol = 'SEK'},
['XBT'] = {page = 'Bitcoin', plural = 's', position = 'bs', symbol = 'BTC'},
}
return {currency_properties=currency_properties, code_translation=code_translation, non_standard_properties=non_standard_properties}