Template:UcfirstSwitch

From "PTTLink Wiki"
Jump to navigation Jump to search

{{{1}}}

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:UcfirstSwitch/doc.

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.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Text1

The text to display (first letter lower case, otherwise useless)

Contentrequired
switch2

Boolean value indicating whether the first letter of the text should be upper cased

Default
0
Booleansuggested

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