Template:IfEnglishThenSpaces: Difference between revisions
More actions
mNo edit summary |
m 5 revisions imported |
||
(No difference)
| |||
Latest revision as of 12:12, 12 August 2026
This template will auto add space before the words if start with English or Number characters and do the same with after word, Useful when localization to another languages that requires space to separate words from the normal local language.
Usage
{{IfEnglishThenSpaces |1= |2= |3= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | Texts | Texts to process. | empty | required |
2ignore | Ignore a space | Force hide the space at before or after the words. Value might be start or end | empty | optional |
3 | Localization for language | Localization separate for each language. Use language code like en for English. | empty | optional |
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
Placement:
In localized page.
Relies on:
Module:String
Localization
This template is not intended to be localized.
Example
Before use this templates
'''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{{1}}}|}}ซึ่งประกอบไปด้วยภาพ {{#if:{{{2|}}}|{{{2}}}|หลาย}} ภาพที่ซ้อนทับกันโดยใช้{{#if:{{{3|}}}|{{{3}}}|ซอร์ฟแวร์เฉพาะ}} ดังนั้น...
given:
หมายเหตุ: ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัสซึ่งประกอบไปด้วยภาพ หลาย ภาพที่ซ้อนทับกันโดยใช้ซอร์ฟแวร์เฉพาะ ดังนั้น...
So, This will be look very strange in some of Asian languages. There don't need space at some position.
After use this template:
'''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{iets|{{{1}}}}}|}}ซึ่งประกอบไปด้วยภาพ{{#if:{{{2|}}}|{{iets|{{{2}}}}}|หลาย}}ภาพที่ซ้อนทับกันโดยใช้{{#if:{{{3|}}}|{{iets|{{{3}}}|ignore=end}}|ซอร์ฟแวร์เฉพาะ}} ดังนั้น...
given: หมายเหตุ: ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัสซึ่งประกอบไปด้วยภาพหลายภาพที่ซ้อนทับกันโดยใช้ซอร์ฟแวร์เฉพาะ ดังนั้น...
If we add |2=6 and |3=Adobe Photoshop to this template in example, It will automatically add spaces around number and Latin characters (It has the page for configuration separate for each language).
'''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{iets|{{{1}}}}}|}}ซึ่งประกอบไปด้วยภาพ{{#if:6|{{iets|6}}|หลาย}}ภาพที่ซ้อนทับกันโดยใช้{{#if:Adobe Photoshop|{{iets|Adobe Photoshop|end}}|ซอร์ฟแวร์เฉพาะ}} ดังนั้น...
given: หมายเหตุ: ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัสซึ่งประกอบไปด้วยภาพ 6 ภาพที่ซ้อนทับกันโดยใช้ Adobe Photoshop ดังนั้น...
|2=end meaning to not add space after words. Because it is have a space already.