Difference between revisions of "Template:Currency/Position"

From blackwiki
Jump to navigation Jump to search
imported>SimonTrew
(First version, need to save before test)
 
imported>SimonTrew
(→‎top: includeonly)
 
Line 1: Line 1:
{{#switch:{{uc:{{{1|}}}}}<!-- If you add a case to this switch statement, be sure to give the case in upper case letters, since the us parser function used here converts everything given to upper case. -->
+
<includeonly>{{#switch:{{uc:{{{1|}}}}}<!-- If you add a case to this switch statement, be sure to give the case in upper case letters, since the us parser function used here converts everything given to upper case. -->
 
|AED=bs
 
|AED=bs
 
|AFN=b
 
|AFN=b
Line 129: Line 129:
 
|ZAR=b
 
|ZAR=b
 
|=b<!-- [[US dollars|$]]-->
 
|=b<!-- [[US dollars|$]]-->
}}<noinclude>
+
}}</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 09:26, 30 November 2015

Template documentation[view] [edit] [history] [purge]

For a given currency symbol as understood by {{Currency/Type}}, returns a short string indicating the desired position and spacing required around the currency unit. This can be used as input to {{Currency/Format}} to format a currency symbol and amount.

Use

The set of results currently returned symbols is as follows:

Result Intent
b Symbol placed before amount, no space between them
bs Symbol placed before amount, no-break space (&nbsp;) between them
a Symbol placed after amount, no-space between them
as Symbol placed after amount, no-break space (&nbsp;)between them

If the first parameter evaluates to the empty string, "b" is returned.