Namespaces
Variants
Actions

Template:get lang

From cppreference.com
Revision as of 10:53, 31 May 2013 by P12 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
cpp
[edit] [{{purge}}] Template documentation

Returns the programming language to use for a page by default. The output value depends on the title of the page this template is included in.

{{get lang}}

If the page title begins with "c/", then the output value is "c", if the page title begins with "cpp/", then the output value is "cpp". Otherwise the output value is "cpp".

{{get lang formal}}

If the page title begins with "c/", then the output value is "C", if the page title begins with "cpp/", then the output value is "C++". Otherwise the output value is "C++".