Template:IfEnglishThenSpaces/doc: Difference between revisions
More actions
Add doc with bad english |
m 3 revisions imported |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 9: | Line 9: | ||
|1stat = required | |1stat = required | ||
|2 = | |2 = 2 | ||
|2label = Ignore a space | |2label = Ignore a space | ||
|2d-en = Force hide the space at before or after the words. Value might be {{code|start}} or {{code|end}} | |2d-en = Force hide the space at before or after the words. Value might be {{code|start}} or {{code|end}} | ||
|2d-td = Force hide the space at before or after the words. Value might be `start` or `end` | |2d-td = Force hide the space at before or after the words. Value might be `start` or `end` | ||
|2aliases = | |2aliases = ignore | ||
|2type = string | |2type = string | ||
|2def = | |2def = | ||
|2stat = optional | |2stat = optional | ||
|3 = 3 | |||
|3label = Localization for language | |||
|3d-en = Localization separate for each language. Use language code like {{code|en}} for English. | |||
|3d-td = Localization separate for each language. Use language code like `en` for English. | |||
|3aliases = | |||
|3type = string | |||
|3def = | |||
|3stat = optional | |||
|name = IfEnglishThenSpaces | |name = IfEnglishThenSpaces | ||
| Line 41: | Line 50: | ||
== Example == | == Example == | ||
Before use this templates | Before use this templates | ||
< | <syntaxhighlight lang="wikitext"> | ||
'''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{{1}}}|}}ซึ่งประกอบไปด้วยภาพ {{#if:{{{2|}}}|{{{2}}}|หลาย}} ภาพที่ซ้อนทับกันโดยใช้{{#if:{{{3|}}}|{{{3}}}|ซอร์ฟแวร์เฉพาะ}} ดังนั้น... | '''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{{1}}}|}}ซึ่งประกอบไปด้วยภาพ {{#if:{{{2|}}}|{{{2}}}|หลาย}} ภาพที่ซ้อนทับกันโดยใช้{{#if:{{{3|}}}|{{{3}}}|ซอร์ฟแวร์เฉพาะ}} ดังนั้น... | ||
</ | </syntaxhighlight> | ||
given: | given: | ||
'''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{{1}}}|}}ซึ่งประกอบไปด้วยภาพ {{#if:{{{2|}}}|{{{2}}}|หลาย}} ภาพที่ซ้อนทับกันโดยใช้{{#if:{{{3|}}}|{{{3}}}|ซอร์ฟแวร์เฉพาะ}} ดังนั้น... | '''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{{1}}}|}}ซึ่งประกอบไปด้วยภาพ {{#if:{{{2|}}}|{{{2}}}|หลาย}} ภาพที่ซ้อนทับกันโดยใช้{{#if:{{{3|}}}|{{{3}}}|ซอร์ฟแวร์เฉพาะ}} ดังนั้น... | ||
So, This will be look very strange. | So, This will be look very strange in some of Asian languages. There don't need space at some position. | ||
After use this template: | After use this template: | ||
< | <syntaxhighlight lang="wikitext"> | ||
'''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{iets|{{{1}}}}}|}}ซึ่งประกอบไปด้วยภาพ{{#if:{{{2|}}}|{{iets|{{{2}}}}}|หลาย}}ภาพที่ซ้อนทับกันโดยใช้{{#if:{{{3|}}}|{{iets|{{{3}}}|ignore=end}}|ซอร์ฟแวร์เฉพาะ}} ดังนั้น... | '''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{iets|{{{1}}}}}|}}ซึ่งประกอบไปด้วยภาพ{{#if:{{{2|}}}|{{iets|{{{2}}}}}|หลาย}}ภาพที่ซ้อนทับกันโดยใช้{{#if:{{{3|}}}|{{iets|{{{3}}}|ignore=end}}|ซอร์ฟแวร์เฉพาะ}} ดังนั้น... | ||
</ | </syntaxhighlight> | ||
given: | given: | ||
'''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{iets|{{{1}}}}}|}}ซึ่งประกอบไปด้วยภาพ{{#if:{{{2|}}}|{{iets|{{{2}}}}}|หลาย}}ภาพที่ซ้อนทับกันโดยใช้{{#if:{{{3|}}}|{{iets|{{{3}}}| | '''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{iets|{{{1}}}}}|}}ซึ่งประกอบไปด้วยภาพ{{#if:{{{2|}}}|{{iets|{{{2}}}}}|หลาย}}ภาพที่ซ้อนทับกันโดยใช้{{#if:{{{3|}}}|{{iets|{{{3}}}|end}}|ซอร์ฟแวร์เฉพาะ}} ดังนั้น... | ||
If we add {{para|2|6}} and {{para|3|Adobe Photoshop}} to this template, It will automatically add spaces around number and Latin characters. | If we add {{para|2|6}} and {{para|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). | ||
< | <syntaxhighlight lang="wikitext"> | ||
'''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{iets|{{{1}}}}}|}}ซึ่งประกอบไปด้วยภาพ{{#if:6|{{iets|6}}|หลาย}}ภาพที่ซ้อนทับกันโดยใช้{{#if:Adobe Photoshop|{{iets|Adobe Photoshop| | '''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{iets|{{{1}}}}}|}}ซึ่งประกอบไปด้วยภาพ{{#if:6|{{iets|6}}|หลาย}}ภาพที่ซ้อนทับกันโดยใช้{{#if:Adobe Photoshop|{{iets|Adobe Photoshop|end}}|ซอร์ฟแวร์เฉพาะ}} ดังนั้น... | ||
</ | </syntaxhighlight> | ||
given: '''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{iets|{{{1}}}}}|}}ซึ่งประกอบไปด้วยภาพ{{#if:6|{{iets|6}}|หลาย}}ภาพที่ซ้อนทับกันโดยใช้{{#if:Adobe Photoshop|{{iets|Adobe Photoshop| | given: '''หมายเหตุ:''' ภาพนี้คือภาพทึ่ใช้เทคนิคการซ้อนโฟกัส{{#if:{{{1|}}}|{{iets|{{{1}}}}}|}}ซึ่งประกอบไปด้วยภาพ{{#if:6|{{iets|6}}|หลาย}}ภาพที่ซ้อนทับกันโดยใช้{{#if:Adobe Photoshop|{{iets|Adobe Photoshop|end}}|ซอร์ฟแวร์เฉพาะ}} ดังนั้น... | ||
{{para| | {{para|2|end}} meaning to not add space after words. Because it is have a space already. | ||
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= }}
Or use the shorthand
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.