ទំព័រគំរូ:t/doc
Documentation
កែប្រែUse this template in the Translations section to format a translation of an English entry.
This template takes 3 positional parameters:
- language code
- translated word
- (optional) gender/number, one of m, f, c, n, s or p (See templates
{{m}}
,{{f}}
,{{c}}
,{{n}}
) - (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 {{tø}}
. 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 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=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 butterfly:
*Arabic: {{t|ar|فراشة|sc=Arab|f|tr=fará:sha}}; (fertito) ''(Morocco)''; (fartattu) {{italbrac|Tunisia}} *[[Datiwuy]]: {{t|duj|buurnba}} *[[Javanese]]: {{t-|jv|kupu}} *Latin: {{t-|la|papilio|alt=pāpíliō}} *[[Yoruba]]: {{t-|yo|labalábá}}
- Arabic: فراشة ឥ (fará:sha); (fertito) (Morocco); (fartattu) (Tunisia)
- Datiwuy: Lua error in Module:languages at line 238: attempt to index local 'name' (a nil value).
- Javanese: kupu (kupu)
- Latin: pāpíliō
- Yoruba: 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.
Customization of links
កែប្រែNote that Internet Explorer does not implement basic features of CSS 2.0 and 2.1 in any released version (6/7). So only the first set of customizations work with IE. All of the following work on all other browsers at their current or fairly recent revision and in IE8.
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
កែប្រែ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.