Difference between revisions of "Template:Version"
From Kerbal Space Program Wiki
Line 8: | Line 8: | ||
| ko=Version history/ko | | ko=Version history/ko | ||
| hu=Version history/hu | | hu=Version history/hu | ||
+ | | it=Version history/it | ||
| force = {{{lang|}}}}}#{{#ifeq: {{padleft:|1|{{{1}}}}}|v||v}}{{{1}}}|{{#ifeq: {{{2|!}}}|!|{{lang | en = version | | force = {{{lang|}}}}}#{{#ifeq: {{padleft:|1|{{{1}}}}}|v||v}}{{{1}}}|{{#ifeq: {{{2|!}}}|!|{{lang | en = version | ||
| de = Version | | de = Version | ||
Line 15: | Line 16: | ||
| ko = 버전 | | ko = 버전 | ||
| hu = verzió | | hu = verzió | ||
+ | | it = Versione | ||
| force = {{{lang|}}}}} |{{#if: {{{2|}}}|{{{2}}} }}}}{{{1}}}]]</includeonly><noinclude> | | force = {{{lang|}}}}} |{{#if: {{{2|}}}|{{{2}}} }}}}{{{1}}}]]</includeonly><noinclude> | ||
This template links to a release in the version history. '''Only use this template to link to versions for which there is no article linking to it.''' For example it shouldn't be used for links like [[0.90.0]]. | This template links to a release in the version history. '''Only use this template to link to versions for which there is no article linking to it.''' For example it shouldn't be used for links like [[0.90.0]]. | ||
Line 52: | Line 54: | ||
* Korean | * Korean | ||
* Hungarian | * Hungarian | ||
+ | * Italian | ||
== Examples == | == Examples == |
Revision as of 20:37, 10 February 2018
This template links to a release in the version history. Only use this template to link to versions for which there is no article linking to it. For example it shouldn't be used for links like 0.90.0.
Pseudo code
if {{{2|}}} // prefix text is undefined OR defined as a non-empty string if {{{2}}} // prefix text is defined as a non-empty string "{{{2}}} {{{1}}}" else // prefix text is undefined "version {{{1}}}" else // prefix text is defined as an empty string "{{{1}}}"
Parameters
# | Optional | Description | Default |
---|---|---|---|
1 | No | Version number; may begin with a “v” | |
2 | Yes | Text shown and linked in front of the version number. When set to ! it shows the default text. | version (or the localisation) |
lang | Yes | Force a specific language if set. | Not set |
Localization
The version number can be preceded by a 'v'. It links to the localized pages for the following languages:
- German
- Polish
- Russian
- Chinese (zh-cn)
- Korean
- Hungarian
The “version” default text is translated into the following languages:
- German
- Polish
- Russian
- Korean
- Hungarian
- Italian
Examples
Usage | Produces |
---|---|
{{version|0.17}} |
version 0.17 |
{{version|0.17|}} |
0.17 |
{{version|0.17|prefix text here}} |
prefix text here 0.17 |