Template:UcfirstSwitch/doc
![]() | This is a documentation subpage for . It contains usage information, categories and other content that is not part of the original template page. |
This template converts a text’s first letter to upper case if the second parameter is truthy. It’s useful in templates, where the second parameter comes from a parameter of that template or some complex condition, so that the text needs to be given only once.
Usage
{{UcfirstSwitch |1= |2= }}
Template parameters
This template converts a text’s first letter to upper case if the second parameter is truthy. It’s useful in templates, where the second parameter comes from a parameter of that template or some complex condition, so that the text needs to be given only once.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Text | 1 | The text to display (first letter lower case, otherwise useless) | Content | required |
switch | 2 | Boolean value indicating whether the first letter of the text should be upper cased
| Boolean | suggested |
Additional information
The template is intended to be used in the following namespaces: the Template namespace
The template is intended to be used by the following user groups: all users
Relies on:
{{boolean}}
Localization
This template is not intended to be localized.
Example
{{UcfirstSwitch|text|0}}
text
{{UcfirstSwitch|text|1}}
Text