Template:BCP47/doc

{{TemplateBox |1 =    |1d-en =code |1label = |1aliases = |1type =string |1def = |1stat = |name = |desc = This template fixes the current violations of the BCP47 standard (for inclusion in the lang HTML attribute) by Miraheze sites for their language codes.

It also normalizes these codes to lowercase only (though it is not mandatory).

Use this template only in the HTML  attribute.

Examples
|usergroup = |placement = |usage-notes = |type = |example = |example-value = |i18n-method = |i18n-desc = |i18n-mediawiki-msg = |i18n-subpage = |seealso = |setscats = |lines = |shorthand = |relieson = |mustbesubst = }}
 * Unaffected codes, for example:
 * " " returns: ""
 * Changes required by BCP47, using standard codes:
 * " " returns: ""
 * " " returns: ""
 * " " returns: ""
 * " " returns: ""
 * " " returns: ""
 * Changes required by BCP47, currently using private-use extensions:
 * " " returns: ""
 * " " returns: ""
 * Changes preferable with BCP47 for improved interoperability (not really violations):
 * " " returns: "" |namespace =