Template:CURRENTCONTENTLANGUAGE/doc

Usage
This template returns the "content language" of the current page; more precisely it checks if the current title ends with a language code, and if it is the case it returns this language code, else (the default content language; on this wiki: "" for ).

Examples
(Note: there could be false positive: e.g. on "Foo/bar" it returns "bar" because "bar" is the language code for Bavarian; "foo" is not a language code; very small (2 or 3 letters) last words can be a problem as seen here.)
 * on "Bar/foo", this template returns "";
 * on "Bar/foo/hu", this template returns "hu".

This template takes no argument, and acts as a magic word.

Alternative magic word
Since the creation of this template, the magic word  has been created and can be used instead of this template (see T59603).