Template:Multilingual link
This template allows to create links to different language versions of same Wikipedia article, and only one link will be displayed.
Usage[edit]
Main parameters[edit]
Just use ISO codes of languages as parameter names, and article names as parameter values.
For example, you can write{{multilingual link
|ar=حركة الإنترنت
|el=Διαδικτυακή κυκλοφορία
|en=Internet traffic
|eo=Reta trafiko
|fr=Trafic Internet
|gl=Tráfico en Internet
|ko=인터넷 트래픽
|pl=Ruch internetowy
|ru=Сетевой трафик
|sl=Internetni promet (statistika)
|uk=Інтернет трафік
|uz=Tarmoq trafigi
|vi=Lưu lượng truy cập
}}
Default language[edit]
When default language is not indicated, default language is English (en) if it is present.
The code{{multilingual link
|eo=David Mentelli
|hu=Mandelli Dávid
|ru=Ментелли, Давид
}}
{{multilingual link
|eo=David Mentelli
|hu=Mandelli Dávid
|ru=Ментелли, Давид
|default=eo
}}
|default=fr
but do not fill the parameter fr), the template will display nothing for that user.
If you do not use the parameter default, be sure to have an English version (the parameter en). If the article has not an English version, be sure to use the parameter default. And if you use the parameter default, be sure to have also the parameter for the indicated default language (for example, if you write |default=de
, the parameter de must be present).
{{multilingual link
|en=MHSnet
|eo=.oz
|fr=.oz
|ru=.oz
|uk=.oz
}}
{{multilingual link
|en=MHSnet
|eo=.oz
|fr=.oz
|ru=.oz
|uk=.oz
|default=eo
}}
Displayed titles[edit]
By default, visible text of link is article name. It can be changed with parameters, whose names consist of the word title, space and ISO code of language.
For example, if you write{{multilingual link
|de=Scharfrichterhaus (Passau)
|en=Scharfrichterhaus
|zh=刽子手之家
}}
{{multilingual link
|de=Scharfrichterhaus (Passau)|title de=Scharfrichterhaus
|en=Scharfrichterhaus
|zh=刽子手之家
}}
{{multilingual link
|de=The Octagon (Dunedin)|title de=The Octagon
|en=The Octagon, Dunedin|title en=The Octagon
|zh=八角广场 (但尼丁)|title zh=八角广场
}}
{{multilingual link
|en=NEC μCOM series
|it=Serie NEC μCOM
|ja=ΜCOMシリーズ
|title=NEC µPD780C
}}
title
), you can indicate the ISO code of its language in the parameter titlelang
:{{multilingual link
|en=Miss England I
|es=Miss England I
|fa=دوشیزه انگلستان اول
|it=Miss England I
|title=Miss England
|titlelang=en
}}
Instead of using parameters title
or title x
(x means language code), you can use parameters before
, before x
, after
and after x
.
{{multilingual link
|en=Grigory Bey-Bienko|before en=entomologist 
|fr=Grigori Beï-Bienko|before fr=entomologiste 
|kk=Григорий Яковлевич Бей-Биенко|before kk=энтомолог 
|ru=Бей-Биенко, Григорий Яковлевич|before ru=энтомолог 
|uk=Бей-Бієнко Григорій Якович|before uk=ентомолог 
|after= (1903—1971)
}}
{{multilingual link
|en=Grigory Bey-Bienko|before en=entomologist 
|fr=Grigori Beï-Bienko|before fr=entomologiste 
|kk=Григорий Яковлевич Бей-Биенко|before kk=энтомолог 
|ru=Бей-Биенко, Григорий Яковлевич|title ru=энтомолог Григорий Яковлевич Бей-Биенко (1903—1971)
|uk=Бей-Бієнко Григорій Якович|before uk=ентомолог 
|after= (1903—1971)
}}
Design[edit]
By default, the template does not display language name. This behaviour can be changed with the parameter langdesign
. Its values:
value | explanation | example |
---|---|---|
b |
language name in bold letters | English: |
bc |
language name in bold capitalised letters | English: |
bci |
language name in bold capitalised italic letters | English: |
bi |
language name in bold italic letters | English: |
c |
language name in capitalised letters | English: |
ci |
language name in capitalised italic letters | English: |
i |
language name in italic letters | English: |
normal |
language name in normal letters | English: |
{{multilingual link
|ceb=Mino Wan
|en=Miho Bay
|ja=美保湾
|ru=Михо (бухта)|title ru=бухта Михо
|langdesign=b
}}
Order of letters in the short values (bc
, bci
, bi
and ci
) can be any: cb
is equal to bc
, ib
is equal to bi
, et caetera. Any other value (foo
, none
, et caetera) is treated equally to normal
: language name is displayed in normal letters. If you do not want to display language name, just do not use the parameter langdesign
.
By default, link is displayed in normal letters. This behaviour can be changed with the parameter textdesign
. It accepts the same short values as the parameter langdesign
(see the above table). The value normal
or any other value is equal to non-using the parameter textdesign
: link is displayed in normal letters.
Syntax helper[edit]
The wikitext to call the template {{multilingual link}}
can be long (sometimes hundreds of lines), writing it is tedious. The Perl script Syntax helper creates such wikitext for you.
./syntaxhelper.perl en:Saint Petersburg State Agrarian University
or ./syntaxhelper.perl Q1628690
, the script returns the wikitext{{multilingual link
|be=Санкт-Пецярбургскі дзяржаўны аграрны ўніверсітэт
|en=Saint Petersburg State Agrarian University
|eo=Sankt-Peterburga Ŝtata Agrikultura Universitato
|et=Peterburi Riiklik Agraarülikool
|fr=Université agraire d'État de Saint-Pétersbourg
|ru=Санкт-Петербургский государственный аграрный университет
}}