3,554 bytes added
, 3 years ago
{{lua|Module:Languages}}
{{TemplateBox
|1=1
|1d=Page name of the page that's subpages provide the translation
|1def=<nowiki>{{NAMESPACE}}:{{BASEPAGENAME}}</nowiki>
|1stat=optional
|2=addlink
|2d=provide an alternative add-link or whatever you like right after the language links
|2def=<nowiki>{{edit|{{NAMESPACE}}:{{BASEPAGENAME}}/lang}}</nowiki>
|2stat=optional-
|3=suppressaddlink
|3d=allows to remove the <small><code><nowiki>+/-</nowiki></code></small> -link
|3d-td=allows to remove the "<nowiki>+/-</nowiki>" -link
|3def=
|3stat=optional-
|name=Lang links
|desc-az=Bu şablon yeni tərcümələri avtomatik əlavə edir.
|desc-de=Zeigt an, welche Sprachversionen einer Übersetzung existieren.
|desc-en=Shows which language versions of a page exist.
|desc-es=Esta plantilla añade automáticamente nuevas traducciones. No debe ser usada para reemplazar páginas /lang creadas manualmente. A veces es bueno tener algunos vínculos en rojo pues esto anima a realizar nuevas traducciones.
|desc-fr=Ce modèle ajoute automatiquement de nouvelles traductions. Il ne devrait cependant pas être utilisé pour remplacer des pages de type /lang créées manuellement. Parfois il peut être intéressant de disposer de quelques liens rouges, car cela encourage à créer de nouvelles traductions.
|desc-ka=ეს თარგი ავტომატურად ამატებს ახალ თარგმანებს.
|desc-ru=Этот шаблон добавляет новые переводы автоматически.
|desc-diq=Na şablon açarnayışanê newe otomatikmene dekena de.
|namespace=Template
|usergroup=All
|placement=
|usage-notes=
This template shows which language versions of a page exist (based on the naming scheme <code>../xx</code>, with <code>xx</code> the language code), and provides links to them. For example:
{{xpdoc|lang links|Template:No source since}}
Compare:
{{xpdoc|lang links cheap|Template:No source since}}
(based on [[Special:Prefixindex]]), which does not distinguish between a postfix for a language and other postfixes such as /doc and /layout. Another difference is that the language code is shown, rather than the local name.
'''This template should not be used on templates''' to avoid hitting the "expensive parser function" or the "LUA execution time" limit on pages with other expensive templates. If your template needs language links, create a <code><nowiki>/lang</nowiki></code> subpage, transclude it to the template and regularly update it using {{tls|lle}}. '''Never''' use this template directly or indirectly on templates intended for the file namespace that will likely stay there for a long time.
Performance: This template makes use of different approaches to be fast and correct. First, it evaluates all subpages of the page it show the language links for. If this takes too long, it switches to another approach: It checks, for each language, whether a page in that language exists. Therefore: If can avoid that your page gets a lot of subpages, this template's performance will be superior. Technical details and talk at [[Template talk:Lang links#Using LUA]].
[[Template:Ll]] will generate the same results but must be substituted.
|type=Language link template
|example=
|i18n-method=-
|i18n-desc=
|i18n-mediawiki-msg=
|seealso={{tl|Ll}}, {{tl|Lle}}, {{tl|lang links cheap}}
|setscats=
|lines=1
|shorthand=
|relieson=[[Module:Languages]], [[Module:Languages/List]], [[Module:Page]]
|useTemplateData=1
}}<includeonly>
[[Category:Internal link templates]]
</includeonly>