User:VivaRomania/Sandbox: Difference between revisions
Jump to navigation
Jump to search
VivaRomania (talk | contribs) mNo edit summary |
VivaRomania (talk | contribs) m New translation link template idea |
||
| Line 1: | Line 1: | ||
Welcome to my Sandbox where I work on random stuff. If you think any of these are good enough to use, feel free to take the code and turn them into an actual templates and put them into use. | |||
< | == Translation link template == | ||
'''Translators get to deal with a slight pain in the ass when creating links to other articles, as they have to give every link a custom name and add in the language code to the link. As an example:''' | |||
: <nowiki>[[Weapons/fr|Weapons]]</nowiki> | |||
'''I imagine that can get tiring after a while. My proposal is as follows. This code has been tested and is perfectly functional:''' | |||
:<nowiki>[[{{{1}}}/{{PAGELANGUAGE}}|{{ #if: {{{2|}}} | {{{2}}} | {{{1}}} }}]]</nowiki> | |||
'''To keep the template name short, [[Template:t]] could be used. I initially wanted to use [[Template:tl]] for this, but theres already a stock template under that name. Usage would be:''' | |||
:<nowiki>{{t|Weapons}}</nowiki> | |||
'''Or to specify a custom word or phrase for the link:''' | |||
:<nowiki>{{t|Weapons|weaponry}}</nowiki> | |||
== Possible [[Template:Nav classes]]? == | |||
{| class="mw-collapsible navbox" width=100% cellpadding=1 align="center" style="text-align:center; font-size:90%; background: #E5E0DC; border: 1px solid #583A31;" | {| class="mw-collapsible navbox" width=100% cellpadding=1 align="center" style="text-align:center; font-size:90%; background: #E5E0DC; border: 1px solid #583A31;" | ||
! class="header" style="font-size:110%; background: #8B6D64; padding: 0.2em 0.4em;" height=25| <div style="float:left;vertical-align:middle;">{{navbar|Nav gamemodes|plain=1}}</div>[[:Category:Classes|Classes]] | ! class="header" style="font-size:110%; background: #8B6D64; padding: 0.2em 0.4em;" height=25| <div style="float:left;vertical-align:middle;">{{navbar|Nav gamemodes|plain=1}}</div>[[:Category:Classes|Classes]] | ||
Revision as of 05:09, 9 March 2025
Welcome to my Sandbox where I work on random stuff. If you think any of these are good enough to use, feel free to take the code and turn them into an actual templates and put them into use.
Translation link template
Translators get to deal with a slight pain in the ass when creating links to other articles, as they have to give every link a custom name and add in the language code to the link. As an example:
- [[Weapons/fr|Weapons]]
I imagine that can get tiring after a while. My proposal is as follows. This code has been tested and is perfectly functional:
- [[{{{1}}}/{{PAGELANGUAGE}}|{{ #if: {{{2|}}} | {{{2}}} | {{{1}}} }}]]
To keep the template name short, Template:t could be used. I initially wanted to use Template:tl for this, but theres already a stock template under that name. Usage would be:
- {{t|Weapons}}
Or to specify a custom word or phrase for the link:
- {{t|Weapons|weaponry}}
Possible Template:Nav classes?
Classes
|
|---|









