Template:Colon: Difference between revisions
More actions
mNo edit summary |
m adapt to more scripts (most of them Indic, plus Mongolian/Mandchu and Tifinagh) |
||
| Line 1: | Line 1: | ||
{{#switch:{{LangSwitch | {{#switch: {{LangSwitch<!-- first map some languages to scripts and variants --> | ||
| am = Ethi | | am = Ethi | ||
| br = Zinh- | | ber = Tfng | ||
| co = Zinh- | | bn = Beng | ||
| bo = Tibt | |||
| br = Zinh-nnbsp-P-space | |||
| ca = Zinh-nnbsp-P-space | |||
| co = Zinh-nnbsp-P-space | |||
| es = Zinh-nnbsp-P-space | |||
| fr = Zinh-nnbsp-Po-space | |||
| gsw = Zinh-nnbsp-P-space | |||
| he = Hebr | | he = Hebr | ||
| hi = Deva | | hi = Deva | ||
| hy = Armn | |||
| ii = Yiii | | ii = Yiii | ||
| ja = Jpan | | ja = Jpan | ||
| km = Khmr | | km = Khmr | ||
| kn = Knda | |||
| ko = Hang | | ko = Hang | ||
| | | ml = Mlym | ||
| | | mn-Mong = Mong | ||
| ro = Zinh- | | oc = Zinh-nnbsp-Po-space | ||
| or = Orya | |||
| pt = Zinh-nnbsp-P-space | |||
| pt-br = Zinh-nnbsp-P-space | |||
| ro = Zinh-nnbsp-Po-space | |||
| si = Sinh | |||
| te = Telu | |||
| th = Thai | |||
| ti = Ethi | | ti = Ethi | ||
| wuu = Hant | |||
| yi = Hebr | | yi = Hebr | ||
| yue = Hant | | yue = Hant | ||
| Line 20: | Line 37: | ||
| default = Zinh-Po-space | | default = Zinh-Po-space | ||
}} | }} | ||
|Ethi = ፥ <!-- Ethiopic punctuation sign colon --> | |Ethi = ፥ <!-- Ethiopic punctuation sign colon --> | ||
|Mong = ᠄<!-- Mongolian/Mandchu punctuation sign colon --> | |||
|Bpmf|Phpa|Tale|Talu|Yiii<!-- Indo-Sinitic scripts used along with Chinese --> | |Bpmf|Phpa|Tale|Talu|Yiii<!-- Indo-Sinitic scripts used along with Chinese --> | ||
|Hang|Hani|Hans|Hant|Jpan = :<!-- CJK punctuation | |Hang|Hani|Hans|Hant|Jpan = :<!-- CJK punctuation fullwidth colon (rotated if vertical layout) --> | ||
|Armn<!-- avoids confusion with U+0589 Armenian punctuation Full stop --> | |||
|Hebr<!-- avoids confusion with U+05C3 Hebrew punctuation sign Sof Pasuk --> | |||
|Deva<!-- avoids confusion with U+0903 Devanagari combining sign Visarga --> | |Deva<!-- avoids confusion with U+0903 Devanagari combining sign Visarga --> | ||
| | |Beng<!-- avoids confusion with U+0983 Bengali combining sign Visarga --> | ||
|Khmr<!-- avoids confusion with U+17C8 Khmer combining | |Guru<!-- avoids confusion with U+0A03 Gurmukhi combining sign Visarga --> | ||
|Gujr<!-- avoids confusion with U+0A83 Gujarati combining sign Visarga --> | |||
|Orya<!-- avoids confusion with U+0B03 Oryia combining sign Visarga --> | |||
|Telu<!-- avoids confusion with U+0C03 Telugu combining sign Visarga --> | |||
|Knda<!-- avoids confusion with U+0C83 Kannada combining sign Visarga --> | |||
|Mlym<!-- avoids confusion with U+0D03 Malayalam combining sign Visarga --> | |||
|Sinh<!-- avoids confusion with U+0D83 Sinhalese combining sign Visarga --> | |||
|Tibt<!-- avoids confusion with U+0F7F Tibetan combining sign Rnam Bcad (Nam Che) --> | |||
|Khmr<!-- avoids confusion with U+17C7 / U+17C8 Khmer combining signs Reahmuk / Yukaleakpintu --> | |||
|Tfng<!-- avoids confusion with U+2D53 Tifinagh letter Yu (Touareg Yaw) --> | |||
|Zinh-nbsp-Po-space = :  | |Zinh-nbsp-Po-space = :  | ||
|Zinh-nnbsp-Po-space =  :  | |||
|Zinh-Po-space|#default = :  | |Zinh-Po-space|#default = :  | ||
Revision as of 07:51, 27 May 2014
:
The template returns a localized colon, with a non-breaking space before it and/or a space ( ) after it if needed.
Localized colons need adaptation with some scripts because generic colons (:) may be confusive with other unrelated signs of these scripts, or because these scripts have specific spacing rules.
Usage
{{Colon}}
Template parameters
- TemplateData
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.
Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1 or useTemplateData=only on the /doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.
Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.
Wikipedia's help about TemplateData • Commons-specific information
The template returns a localized colon, with a non-breaking space before it and/or a space ( ) after it if needed. Localized colons need adaptation with some scripts because generic colons (:) may be confusive with other unrelated signs of these scripts, or because these scripts have specific spacing rules.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| language | lang |
| Line | optional |
Additional information
The template is intended to be used in the following namespaces: no namespace specified
The template is intended to be used by the following user groups: no user group specified
See also
Localization
To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx= Your translation " (xx being the code of your language)
Examples
"1{{Colon}}2"gives "1: 2""1{{Colon|lang=ar}}2"gives "1: 2""1{{Colon|lang=am}}2"gives "1: 2""1{{Colon|lang=ber}}2"gives "1: 2""1{{Colon|lang=bn}}2"gives "1: 2""1{{Colon|lang=bo}}2"gives "1: 2""1{{Colon|lang=en}}2"gives "1: 2""1{{Colon|lang=el}}2"gives "1: 2""1{{Colon|lang=he}}2"gives "1: 2""1{{Colon|lang=hi}}2"gives "1: 2""1{{Colon|lang=hy}}2"gives "1: 2""1{{Colon|lang=ii}}2"gives "1: 2""1{{Colon|lang=ja}}2"gives "1: 2""1{{Colon|lang=km}}2"gives "1: 2""1{{Colon|lang=kn}}2"gives "1: 2""1{{Colon|lang=ko}}2"gives "1: 2""1{{Colon|lang=ml}}2"gives "1: 2""1{{Colon|lang=mn-Mong}}2"gives "1: 2""1{{Colon|lang=or}}2"gives "1: 2""1{{Colon|lang=ps}}2"gives "1: 2""1{{Colon|lang=si}}2"gives "1: 2""1{{Colon|lang=ta}}2"gives "1: 2""1{{Colon|lang=te}}2"gives "1: 2""1{{Colon|lang=th}}2"gives "1: 2""1{{Colon|lang=ti}}2"gives "1: 2""1{{Colon|lang=tzm}}2"gives "1: 2""1{{Colon|lang=ur}}2"gives "1: 2""1{{Colon|lang=wuu}}2"gives "1: 2""1{{Colon|lang=yi}}2"gives "1: 2""1{{Colon|lang=yue}}2"gives "1: 2""1{{Colon|lang=zh}}2"gives "1: 2"