Template:Comma/doc: Difference between revisions
Content deleted Content added
GVarnum-WMF (talk | contribs) m 1 revision imported from meta:Template:Comma/doc |
LincolnBot (talk | contribs) m clean up using w:WP:AWB, typos fixed: Don't → Do not (3), you'll → you will |
||
Line 6: | Line 6: | ||
* By default, it is rendered according to the content language of the current page (see {{tl|CURRENTCONTENTLANGUAGE}}) so it will work in translated subpages. |
* By default, it is rendered according to the content language of the current page (see {{tl|CURRENTCONTENTLANGUAGE}}) so it will work in translated subpages. |
||
* If you want to use it in a multilingual page, you |
* If you want to use it in a multilingual page, you will need to specify the language-code in parameter 1 (or <code>uselang</code>). |
||
== Examples == |
== Examples == |
||
Line 21: | Line 21: | ||
== Warning == |
== Warning == |
||
* |
* Do not insert any space after it (this template will insert the word separator conditionally, but the comma returned in Chinese is a wide version and requires no extra space after it). Some languages also do not want any space in the same paragraph (they do not separate words by spaces). |
||
* Commas not followed by a space are used as decimal separators or group separators for the international formatting of numbers (for example with <code><nowiki>{{</nowiki>formatnum:...<nowiki>|</nowiki>''language-code''<nowiki>}}</nowiki></code>): do not use this Comma template for such usage. |
* Commas not followed by a space are used as decimal separators or group separators for the international formatting of numbers (for example with <code><nowiki>{{</nowiki>formatnum:...<nowiki>|</nowiki>''language-code''<nowiki>}}</nowiki></code>): do not use this Comma template for such usage. |
||
Revision as of 23:49, 17 October 2023
This is a documentation subpage for Template:Comma. It contains usage information, categories, and other content that is not part of the original template page. |
Usage
Use it to generate the language-dependant punctuation signs that is used like an English comma, for example between items in a list, or clauses in a sentence.
- By default, it is rendered according to the content language of the current page (see {{CURRENTCONTENTLANGUAGE}}) so it will work in translated subpages.
- If you want to use it in a multilingual page, you will need to specify the language-code in parameter 1 (or
uselang
).
Examples
- In English,
German{{comma|en}}Spanish{{stop|en}}
gives- German, SpanishTemplate:Stop
- In Arabic,
الألمانية{{comma|ar}}الإسبانية{{stop|ar}}
gives- الألمانية، الإسبانيةTemplate:Stop
- In Armenian,
գերմաներեն{{comma|hy}}իսպաներեն{{stop|hy}}
gives- գերմաներեն՝ իսպաներենTemplate:Stop
- In Chinese,
德语{{comma|zh}}西班牙语{{stop|zh}}
gives- 德语、 西班牙语Template:Stop
Warning
- Do not insert any space after it (this template will insert the word separator conditionally, but the comma returned in Chinese is a wide version and requires no extra space after it). Some languages also do not want any space in the same paragraph (they do not separate words by spaces).
- Commas not followed by a space are used as decimal separators or group separators for the international formatting of numbers (for example with
{{formatnum:...|language-code}}
): do not use this Comma template for such usage.
See also