Template:Langcat

From Meta, a Wikimedia project coordination wiki
(Redirected from Template:LangCat)
Template documentation


Warning[edit]

NOTE: This template has functionally been replaced with the {{#translation:}} function (for the most common languages).

Note however that {{#translation:}} only works for languages codes that are internally supported by MediaWiki. There are still translations using correct standard language codes without internal support but still not supported and for which {{#translation:}} will return an ampty string. For this case, the Langcat template should still be used (internally it does not use {{#translation:}} but parses the language code suffix found in page names.

Usage[edit]

This template can be used to add the page to the relevant language category: it's appended to the category name and adds either nothing on the English page, or the language code on the translated pages; it needs the source page title (without namespace) as parameter. Example for the Meta:About page, to be included in the translatable page layout:

For supported language codes (all most common languages) the following syntax is now preferable:

[[Category:Meta-Wiki organisation{{#translation:}}]]

This template adds the "/en" subpages in the same category as the source document, by returning an empty string instead of "/en".

See Page translation administration for general markup instructions.

For the many other non-supported languages codes (provided they are valid language codes), the following returns the correct name and can still be used to return the correct "/code" suffix of the current page to be used in translated category names:

[[Category:Meta-Wiki organisation/{{Langcat}}]]

See also[edit]