Template:Lang subpage
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).
This notice should remain for a minimum of 1 month after it was placed on the page. If discussion is still ongoing it should remain until a consensus is reached (check the talk page), at which time the page may be deleted or this notice may be removed.
If the page has only been edited by the user who nominated it for deletion and/or is in the nominator's user space, then more flexibility in the decision may be allowed.
Check the help page on deleting for more information.
Documentation
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:
No parameter | |
---|---|
Wiki code | {{Lang subpage}}
|
Main version | en |
Sandbox version | en |
Parameter: 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 |
Sandbox version | en en |
Trimmed test | |
---|---|
Wiki code | ___{{Lang subpage}}___
|
Main version | ___en___ |
Sandbox version | ___en___ |
As this template is used in generating URLs, no spacing is allowed.
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.)