ထႅမ်းပလဵတ်ႉ:Language/code
လွင်ႈၸႂ်ႉတိုဝ်း
[မႄးထတ်းငဝ်ႈငႃႇ]This template extracts the language code from a language template.
If called with no parameters, it expects the calling page is either the language template itself, or its documentation page. For example, {{language/code}}
in the documentation for {{Spanish}} would produce es
.
Two optional parameters are also provided for use in exceptional cases. Optional parameter lang
specifies the language template name. For example, {{language/code|lang=Spanish}}
anywhere would produce es
. Non-blank optional parameter name
extracts the language name rather than the language code. For example, {{language/code|lang=Spanish|name=1}}
would produce သပဵၼ်ႇ
.
Internals
[မႄးထတ်းငဝ်ႈငႃႇ]This template depends on the language template to pass on parameter usecode
to {{Languageicon}}, and parses the resulting markup to extract the label on the resulting wikilink.