Template:Lang subpage/doc

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:

Parameters

 * lang (optional): Specify a language code. Useful for testing and documentation purposes.