Template:CURRENTCONTENTLANGUAGE: Difference between revisions
more robust: it checks against the known language codes
(small generalization) |
(more robust: it checks against the known language codes) |
||
Line 1:
<includeonly>{{#
Examples:
* on "Bar/foo", this template returns "{{CONTENTLANGUAGE}}";
* on "Bar/foo/hu", this template returns "hu".
(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.)
This template takes no argument, and acts as a magic word. If such a magic word is created in MediaWiki (see [[bugzilla:57603]]), this template could be deleted
[[Category:Translation templates]]</noinclude>
|