Template:Language info

From Terraria Wiki
Revision as of 17:54, 24 June 2022 by Rye Greenwood (talk | contribs) (+{{i18n-ready}})
Jump to navigation Jump to search
This template uses Lua.
This template uses Module:Language info, a script written in the Lua programming language. To learn more about Lua, see Terraria Wiki:Lua.
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
See Template:Language info/l10n for the localization of this template.
Template-info.svg Documentation The documentation below is transcluded from Template:Language info/doc. (edit | history)

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