Template:CurrencyCode: Difference between revisions

From Donate
Jump to navigation Jump to search
Content deleted Content added
sort, use fallthrough for EUR countries
update TM (Turkmenistan) to TMT
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#switch: {{{1}}}
{{#switch: {{uc:{{{1}}}}}
| US = USD
| US = USD
| CA = CAD
| CA = CAD
Line 5: Line 5:
| NZ = NZD
| NZ = NZD
| GB = GBP
| GB = GBP
| AD | AL | AM | AT | AW | AZ | BE | BY | CI | CY | DE | EE | ES | FI | FR | GF | GR | IE | IT | LT | LU | LV | LY | MC | ME | MG | MT | NL | PT | RE | RS | SI | SK | SM | SR | VA = EUR
| AD | AL | AM | AT | AZ | BE | BY | CI | CY | DE | EE | ES | FI | FR | GF | GR | HR | IE | IT | LT | LU | LV | LY | MC | ME | MG | MT | NL | PT | RE | RS | SI | SK | SM | SR | VA = EUR
| AE = AED
| AE = AED
| AF = USD
| AF = USD
Line 62: Line 62:
| HK = HKD
| HK = HKD
| HN = HNL
| HN = HNL
| HR = HRK
| HU = HUF
| HU = HUF
| ID = IDR
| ID = IDR
Line 132: Line 131:
| TG = USD
| TG = USD
| TH = THB
| TH = THB
| TM = RUB
| TM = TMT
| TN = USD
| TN = USD
| TO = USD
| TO = USD
Line 142: Line 141:
| UA = UAH
| UA = UAH
| UY = UYU
| UY = UYU
| UZ = RUB
| UZ = UZS
| VC = USD
| VC = USD
| VE = VEF
| VE = USD
| VI = USD
| VI = USD
| VN = USD
| VN = USD
Line 155: Line 154:
| EUR = EUR
| EUR = EUR
| #default = USD
| #default = USD
}}<noinclude>
}}<noinclude>[[Category:Utility templates]]
Given an [[w:ISO 3166-1 alpha-2|ISO 3166-1]] two letter country code, returns the currency code ([[w:ISO 4217|ISO 4217]]) to use for fundraiser. If none set e.g. because local currency is not supported, defaults to USD.
Given an [[w:ISO 3166-1 alpha-2|ISO 3166-1]] two letter country code, returns the currency code ([[w:ISO 4217|ISO 4217]]) to use for fundraiser. If none set e.g. because local currency is not supported, defaults to USD.
</noinclude>
</noinclude>

Latest revision as of 20:49, 8 February 2023

USD Given an ISO 3166-1 two letter country code, returns the currency code (ISO 4217) to use for fundraiser. If none set e.g. because local currency is not supported, defaults to USD.