Template:BCP47/doc: Difference between revisions
Template page
More actions
| Line 8: | Line 8: | ||
== Examples == | == Examples == | ||
* Unaffected codes: | * Unaffected codes, for example: | ||
** "<code><nowiki>{{BCP47|en}}</nowiki></code>" returns: "{{BCP47|en}}" | ** "<code><nowiki>{{BCP47|en}}</nowiki></code>" returns: "{{BCP47|en}}" | ||
* Changes | * Changes required by BCP47, using standard codes: | ||
** "<code><nowiki>{{BCP47|als}}</nowiki></code>" returns: "{{BCP47|als}}" | ** "<code><nowiki>{{BCP47|als}}</nowiki></code>" returns: "{{BCP47|als}}" | ||
** "<code><nowiki>{{BCP47| | ** "<code><nowiki>{{BCP47|fiu-vro}}</nowiki></code>" returns: "{{BCP47|fiu-vro}}" | ||
** "<code><nowiki>{{BCP47|simple}}</nowiki></code>" returns: "{{BCP47|simple}}" | ** "<code><nowiki>{{BCP47|simple}}</nowiki></code>" returns: "{{BCP47|simple}}" | ||
** "<code><nowiki>{{BCP47|zh-classical}}</nowiki></code>" returns: "{{BCP47|zh-classical}}" | ** "<code><nowiki>{{BCP47|zh-classical}}</nowiki></code>" returns: "{{BCP47|zh-classical}}" | ||
* Changes | ** "<code><nowiki>{{BCP47|roa-rup}}</nowiki></code>" returns: "{{BCP47|roa-rup}}" | ||
* Changes required by BCP47, currently using private-use extensions: | |||
** "<code><nowiki>{{BCP47|nrm}}</nowiki></code>" returns: "{{BCP47|nrm}}" | ** "<code><nowiki>{{BCP47|nrm}}</nowiki></code>" returns: "{{BCP47|nrm}}" | ||
** "<code><nowiki>{{BCP47|roa-tara}}</nowiki></code>" returns: "{{BCP47|roa-tara}}" | ** "<code><nowiki>{{BCP47|roa-tara}}</nowiki></code>" returns: "{{BCP47|roa-tara}}" | ||
* Changes preferable with BCP47 for improved interoperability (not really violations): | |||
** "<code><nowiki>{{BCP47|be-x-old}}</nowiki></code>" returns: "{{BCP47|be-x-old}}" | |||
<includeonly> | <includeonly> | ||
<!-- template categories and interwiki links --> | <!-- template categories and interwiki links --> | ||
</includeonly> | </includeonly> | ||
Revision as of 20:57, 8 November 2013
Usage
This template fixes the current violations of the BCP47 standard (for inclusion in the lang HTML attribute) by Wikimedia 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 lang="" attribute.
Examples
- Unaffected codes, for example:
- "
{{BCP47|en}}" returns: "en"
- "
- Changes required by BCP47, using standard codes:
- "
{{BCP47|als}}" returns: "gsw" - "
{{BCP47|fiu-vro}}" returns: "vro" - "
{{BCP47|simple}}" returns: "en" - "
{{BCP47|zh-classical}}" returns: "lzh" - "
{{BCP47|roa-rup}}" returns: "rup"
- "
- Changes required by BCP47, currently using private-use extensions:
- "
{{BCP47|nrm}}" returns: "nrf" - "
{{BCP47|roa-tara}}" returns: "it-x-tara"
- "
- Changes preferable with BCP47 for improved interoperability (not really violations):
- "
{{BCP47|be-x-old}}" returns: "be-tarask"
- "