Template:t

      [[{{{2}}}#Undetermined|{{{2}}}]]


      The following documentation is located at Template:t/documentation. [edit]

      Documentation

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

      This template takes 3 positional parameters:

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

      If the translated word does not exist on the foreign language wikt, use {{t-}}, if you know it does, use {{t+}}, and if the foreign wiki doesn't exist, use {{}}. If you don't know whether it exists, use {{t}}. 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 code template, e.g. {{Arab}}. (Using a script template either inside or outside of {{t}} will not produce correct results.) For example:

      * Arabic: {{t|ar|حاسوب|m|sc=Arab|tr=ḥasūb}}, {{t|ar|كمبيوتر|m|sc=Arab|tr=kambyūtar}}

      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 butterfly:

      * Arabic: {{t|ar|فراشة|sc=Arab|f|tr=farāša}}
      * Datiwuy: {{t|duj|buurnba}}
      * Javanese: {{t-|jv|kupu}}
      * Latin: {{t-|la|papilio|alt=pāpíliō}}
      * Yoruba: {{t-|yo|labalábá}}
      

      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.

      ↑Jump back a section

      Customization of links

      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 Special:MyPage/common.css.

      Not showing links

      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

      (tbd)

      Removing parenthesis

      To not show the parenthesis:

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

      Changing superscript and font size

      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

      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

      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

      .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

      .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.

      ↑Jump back a section

      See also

      ↑Jump back a section
      Last modified on 18 June 2013, at 06:09