From Wikimedia Incubator
Jump to navigation Jump to search


Templates {{W-}}, {{W+}}, {{Weh}}, and {{Weh-}} redirect here.

Use this template in the Translations section to format a translation of an English entry.

This template takes 3 positional parameters:

  1. Wt/haw/language code
  2. translated word
  3. Template:Wt/haw/italbrac gender/number, one of m, f, c, n, s or p (See templates {{m}}, {{f}}, {{c}}, {{n}})
  4. Template:Wt/haw/italbrac additional genders/number, should be in listed order

If the translated word does not exist on the foreign language wikt, use {{W-}}, if you know it does, use {{W+}}, and if the foreign wiki doesn't exist, use {{}}. If you don't know whether it exists, use {{W}}. In any case, these are changed by automation to correct them, so don't worry about it.

This is all you need to know to use the template; there are also some optional parameters and other details.

There are also three named parameters, sc=, tr=, and alt=

Language codes for Min Nan (nan) and Cantonese (yue) are fixed by the template, please don't use "zh-min-nan" or "zh-yue"! Code cmn also translates to "zh".

sc= specifies a script template, e.g. {{Arab}}. (Using a script template either inside or outside of {{W}} will not produce correct results.) For example:

* {{Wt/haw/ar}}: {{Wt/haw/W|ar|حاسوب|m|sc=Arab|tr=ħasūb}}, {{Wt/haw/W|ar|كمبيوتر|m|sc=Arab|tr=kambyutr}}

tr= specifies the transliteration into roman (Latin) script, as also shown in the example above.

alt= specifies an alternate form of the word, not the pagename, to be displayed. (The 2nd parameter MUST be the pagename on the en.wikt and the FL wikt!). "alt=" and "sc=" work correctly if both are used. Don't use alt= to include the script template, just use both; that makes it easier for the bot to make sure all the "ar" Arabic entries have sc=Arab

Some examples for Wt/haw/Kinohi:

*{{Wt/haw/it}}: {{Wt/haw/W+|it|Genesi}}
*{{Wt/haw/de}}: {{Wt/haw/W+|de|Genesis}}
*{{Wt/haw/es}}: {{Wt/haw/W+|es|Génesis}}
*{{Wt/haw/la}}: {{Wt/haw/W+|la|Genesis}}
*{{Wt/haw/fr}}: {{Wt/haw/W+|fr|Genèse}}
*{{Wt/haw/en}}: {{Wt/haw/W+|en|Genesis}}
*{{Wt/haw/pt}}: {{Wt/haw/W+|pt|Gênesis}}
  • ʻĪkālia: [[ʻĪkālia|{{ʻĪkālia|lang=it|Genesi}}]] (it)
  • Kelemānia: [[Kelemānia|{{Kelemānia|lang=de|Genesis}}]] (de)
  • Kepania: [[Kepania|{{Kepania|lang=es|Génesis}}]] (es)
  • Lākina: [[Lākina|{{Lākina|lang=la|Genesis}}]] (la)
  • Palani: [[Palani|{{Palani|lang=fr|Genèse}}]] (fr)
  • Pelekania: [[Pelekania|{{Pelekania|lang=en|Genesis}}]] (en)
  • Pukikī: [[Pukikī|{{Pukikī|lang=pt|Gênesis}}]] (pt)

The bot code that manages the templates sometimes adds or removes another parameter, "xs=". It serves to optimize the generation of the section references. This reduces the number of template calls and transcluded text that must be processed. You don't need to try to add these, it is better if the bot does it.

You don't need to worry about it in almost all cases. The only case where you might want to is if you are changing a language name, or perhaps cutting and pasting from a similar language; if the xs parameter doesn't match the language name, it will generated the wrong section reference (until the bot gets to it). The simplest thing in this case is to simply remove it.

Customization of links[edit]

All of the following should work on all browsers at their current or fairly recent revision (IE at least version 8).

Each example is code that you add to User:(your username)/monobook.css (or another skin name if you are not using the default Monobook skin; the skin is set in Preferences).

Not showing links[edit]

The simplest case is hiding the links. To not show red links, to FL entries that don't exist:

.tneg { display: none }

to hide unchecked links add:

.tunk { display: none }

to hide them all, use:

.tpos { display: none }
.tneg { display: none }
.tunk { display: none }

Link colours[edit]


Removing parenthesis[edit]

To not show the parenthesis:

.tlcp { display: none }
.tlc  { display: inline }

Changing superscript and font size[edit]

To cancel out the superscripting and leave the font size normal:

.tpos { vertical-align: baseline; font-size: 100% }
.tneg { vertical-align: baseline; font-size: 100% }
.tunk { vertical-align: baseline; font-size: 100% }

similar code can be used to specify a different vertical alignment and font size. Likewise, other font attributes may be used.

The following do not work on Internet Explorer until version 8

Replacing parenthesis with brackets[edit]

Switch to the code without the parenthesis, and add the desired brackets:

.tlcp { display: none }
.tlc  { display: inline }
.tlc:before { content: "[" }
.tlc:after  { content: "]" }

Adding different symbols after the link[edit]

For example, to display lc+, lc-, and lc? instead of the parenthesis:

.tlc  { display: inline }
.tpos .tlc:after { content: "+" }
.tneg .tlc:after { content: "-" }
.tunk .tlc:after { content: "?" }
.tlcp { display: none }

Replacing the code with symbols[edit]

.tlcp { display:none }
.tpos a.extiw:before { content: "+"; }
.tneg a.extiw:before { content: "-"; }
.tunk a.extiw:before { content: "?"; }

note that since both .tlc and .tlcp are not displayed, the :before tag is attached to the extiw class.

Example: using a triangle on the baseline[edit]

.tpos { vertical-align: baseline; font-size: 100%; }
.tneg { vertical-align: baseline; font-size: 100%; }
.tunk { vertical-align: baseline; font-size: 100%; }
.tlcp { display:none }
.tpos a.extiw:before { content: "►"; }
.tneg a.extiw:before { content: "►"; }
.tunk a.extiw:before { content: "►"; }

and it should be clear how you can use 3 different symbols if desired.