Template:Lang subpage

From Gentoo Wiki
Jump to:navigation Jump to:search
This page has been nominated for deletion

The given reason is: Obsolete. Use #translation: function where appropriate

If there is any reason not to delete this page, do not remove this notice, but please open a discussion on the associated talk page (this should delay deletion until the discussion is resolved).


  Note to admins
[edit

Documentation

Note
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages. As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.

Use this template to extract the language code of subpages. If transcluded on a translated page, the template returns the language code of the subpage (e.g. de for a /de subpage) or defaults to en otherwise.

Usage

Add this code to the page text:

{{Lang subpage}}

Parameters

lang (optional)
Specify a language code. Useful for testing and documentation purposes.
page (optional)
Specify a page title. Useful for testing and documentation purposes.

Examples

See also the template's testcases:

CollapseNo parameter
Wiki code {{Lang subpage}}

Main version en
Sandbox version en
CollapseParameter: page
Wiki code {{Lang subpage|page=LongTitle}} {{Lang subpage|page=LongTitle/en}} {{Lang subpage|page=LongTitle/de}} {{Lang subpage|page=LongTitle/Longer/de}} {{Lang subpage|page=dd}}

Main version en

en
de
de
en

Sandbox version en

en
de
de
en

CollapseTrimmed test
Wiki code ___{{Lang subpage}}___

Main version ___en___
Sandbox version ___en___
Note
As this template is used in generating URLs, no spacing is allowed.
Note
The above documentation is transcluded from Template:Lang subpage/doc. (edit | history)
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.
Please add categories and interwikis to the /doc subpage. (See the subpages of this template.)