Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Supported non-standard currency codes  



2.1  Codes that can be translated to ISO 4217 currencies  





2.2  Other non-standard codes  







3 Examples  





4 Error messages  





5 TemplateData  





6 See also  














Template:Currency






العربية
تۆرکجه


فارسی
Français
Kiswahili
Kreyòl ayisyen
Lietuvių

مصرى
Bahasa Melayu
Монгол


پښتو
Português
Scots
Simple English
Slovenčina
Slovenščina
Srpskohrvatski / српскохрватски
 



 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


Formats a currency value with the appropriate symbol which is linked to the article about the currency. If no currency is specified, the template will show the amount in United States dollars.

Usage

Using unnamed parameters:

{{currency|value|code|first=|linked=|fmt=|passthrough=}}

Using named parameters:

{{currency|amount=value|code=code|first=|linked=|passthrough=}}

where:

value is a number with or without comma separators; may be followed by an optional quantifier: 'thousand', 'million', 'M', 'billion', 'B', or 'trillion'.
code is an ISO 4217 currency code or one of the supported non-standard codes listed below.
|first= when set to any value produces a long-form currency name
|linked= when set to no disables wikilinks on the rendered currency symbol or long-form currency name
|fmt= specifies how value digit-groups are separated:
commas (default) separates value digit-groups with commas; this is the default, same as when |fmt= is empty or omitted
gaps separates value digit-groups with narrow gaps.
none renders value without digit grouping.
|passthrough= specifies whether or not the template should attempt to parse the number according to |fmt= or just put whatever string is provided in |amount= directly after the currency sign. Should have value of either |passthrough=yesor|passthrough=no

When using parameter names, |amount= and |code= are preferred. The template will also accept |Amount= and |type= and |Type= though.

Note: Using both named and unnamed parameters may produce unexpected results. In this example, the template expects the first unnamed parameter to be a value number:

{{Currency|amount=1000|GBP}}
{{currency}} – invalid amount (help)
use {{Currency|1000|GBP}} or {{Currency|amount=1000|code=GBP}}, which both yield £1,000 .

Supported non-standard currency codes

Codes that can be translated to ISO 4217 currencies

These non-standard codes are aliases of standard ISO 4217 codes.

  • EGE
  • EU
  • EURO
  • FRW
  • KSH
  • NEP
  • POUND
  • POUND STERLING
  • RMB
  • STERLING
  • STG
  • TSH
  • UK
  • UNITED STATES
  • US
  • U.S.
  • USA
  • USH
  • Other non-standard codes

    These codes either do not have a matching ISO 4217 currency code or are alternate versions of existing ISO 4217 codes or support unique aspects of a currency.

    Examples

    Currencies other than the United States dollar can be rendered by using the appropriate ISO 4217 currency code

    Some of the more well known currencies also provide the ability to use common abbreviations or full names.

    Parameter names can also be used, if preferred:

    Negative amount:

    Text quantifiers:

    The first use of a currency should show the value and the full name of the currency, so if the "first" parameter is defined then that is what will be given.

    Because the symbol for the currencies DKK, NOK, and SEK may be ambiguous, these may be represented in two ways:

    Similarly, some currencies use different symbols for single and plural amounts:

    Digit grouping:

    Passthrough:

    Error messages

    {{currency}} can produce several error message. These are:

    TemplateData

    This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Currency in articles based on its TemplateData.

    TemplateData for Currency

    Use this template to provide a linked currency symbol and the amount of cash.

    Template parameters[Edit template data]

    This template prefers inline formatting of parameters.

    ParameterDescriptionTypeStatus
    Amount1 amount Amount

    The value in the given currency

    Linerequired
    Currency2 code type Type

    The currency represented. Should be a valid ISO 4217 code or one of the special codes listed on the template’s page

    Default
    USD
    Example
    USD
    Linesuggested
    Long formfirst

    When set to any value, produces a long-form currency name. This should be used for the first mention of a currency within the article

    Lineoptional
    Link currencylinked

    Whether to link to the article on that currency. “no” suppresses the link, any other value displays it

    Default
    yes
    Example
    no
    Lineoptional
    Formatfmt

    Specifies how value digit-groups are separated: commas, gaps or none

    Default
    commas
    Example
    gaps
    Lineoptional
    Passthroughpassthrough

    If "yes", put the string in Amount directly after its symbol without turning it into a number.

    Default
    no
    Example
    yes
    Lineoptional

    See also


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Currency&oldid=1069712315"

    Categories: 
    Lua-based templates
    Currency templates
    Finance templates
    Hidden categories: 
    Wikipedia extended-confirmed-protected templates
    Templates using TemplateData
     



    This page was last edited on 3 February 2022, at 17:59 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki