Template:Language info/doc: Difference between revisions

From Terraria Wiki
Jump to navigation Jump to search
(Revamp.)
(minor clarification (not necessary on redirects), linked namespaces, +Guide namespace)
 
Line 1: Line 1:
This template displays interwiki links, helps organizing the [[Terraria Wiki:Projects#Language projects|translation projects]], and performs some additional miscellaneous operations.
This template displays interwiki links, helps organizing the [[Terraria Wiki:Projects#Language projects|translation projects]], and performs some additional miscellaneous operations.


It should be placed at the end of ''every'' page in the following [[mw:Help:Namespaces|namespaces]]: {{dotlist|{{code|(Main)}}|{{code|Terraria Wiki}}|{{code|Template}}|{{code|Help}}|{{code|Category}}}}
It should be placed at the end of ''every'' non-redirect page in the following [[mw:Help:Namespaces|namespaces]]:
{{dotlist/start}}
{{#lstmap:<!--
namespace list:
-->(Main), Terraria Wiki, Template, Help, Category, Guide<!--
-->|,|@@|<esc>{{dotlist/item|<code>{{fullurl|Special:AllPages|namespace={{NAMESPACENUMBER:@@:x}}|hideredirects=1|text=@@}}</code>}}</esc>|}}
{{dotlist/end}}


The template calls {{tl|code=y|translation projects}} and {{tl|code=y|common}}. It is furthermore the core part of the automatic interwiki link system of the Terraria Wiki: It collects the page names and English interwiki links from each language wiki, merges them to form a database on the English wiki, and then displays the interwiki links according to the language wiki and page it is used on.
The template calls {{tl|code=y|translation projects}} and {{tl|code=y|common}}. It is furthermore the core part of the automatic interwiki link system of the Terraria Wiki: It collects the page names and English interwiki links from each language wiki, merges them to form a database on the English wiki, and then displays the interwiki links according to the language wiki and page it is used on.

Latest revision as of 18:10, 24 June 2022

This template displays interwiki links, helps organizing the translation projects, and performs some additional miscellaneous operations.

It should be placed at the end of every non-redirect page in the following namespaces:

The template calls {{translation projects}} and {{common}}. It is furthermore the core part of the automatic interwiki link system of the Terraria Wiki: It collects the page names and English interwiki links from each language wiki, merges them to form a database on the English wiki, and then displays the interwiki links according to the language wiki and page it is used on.

Usage

{{ language info | en = <English page name> }}

en

Name of the English page. On the English wiki, this must be identical to the page name, so it can be set to {{subst:FULLPAGENAME}}. On language wikis (both on-wiki[1] and off-wiki[2]), it should be the name of the English version of the page.

Interwiki link database maintenance

The automatic interwiki link system relies on the database Module:Language info/data. It is based on all the {{language info}} calls on all the different wikis. This database needs to be updated periodically; the most recent version is always at Template:Language info/datagen. (Because this template transcludes several templates with very long outputs, it might fail to load. In this case, inspect the source code of the template and assemble its output manually.) Once updated, all the interwiki links on the English wiki and the on-wiki languages[1] will be up-to-date.

The off-wiki languages[2] also require the database Module:Language info/data. It can simply be synced as-is from the English wiki.

Footnotes