Template:BCP47/doc: Difference between revisions
Template page
More actions
| Line 8: | Line 8: | ||
== Examples == | == Examples == | ||
* "<code><nowiki>{{BCP47|en}}</nowiki></code>" returns: "{{BCP47|en}}" | * Unaffected codes: | ||
* "<code><nowiki>{{BCP47|simple}}</nowiki></code>" returns: "{{BCP47|simple}}" | ** "<code><nowiki>{{BCP47|en}}</nowiki></code>" returns: "{{BCP47|en}}" | ||
* "<code><nowiki>{{BCP47| | * Changes highly recommanded: | ||
** "<code><nowiki>{{BCP47|als}}</nowiki></code>" returns: "{{BCP47|als}}" | |||
** "<code><nowiki>{{BCP47|be-x-old}}</nowiki></code>" returns: "{{BCP47|be-x-old}}" | |||
** "<code><nowiki>{{BCP47|roa-rup}}</nowiki></code>" returns: "{{BCP47|roa-rup}}" | |||
** "<code><nowiki>{{BCP47|simple}}</nowiki></code>" returns: "{{BCP47|simple}}" | |||
** "<code><nowiki>{{BCP47|zh-classical}}</nowiki></code>" returns: "{{BCP47|zh-classical}}" | |||
* Changes needed (currently using private use extension): | |||
** "<code><nowiki>{{BCP47|nrm}}</nowiki></code>" returns: "{{BCP47|nrm}}" | |||
** "<code><nowiki>{{BCP47|roa-tara}}</nowiki></code>" returns: "{{BCP47|roa-tara}}" | |||
<includeonly> | <includeonly> | ||
<!-- template categories and interwiki links --> | <!-- template categories and interwiki links --> | ||
</includeonly> | </includeonly> | ||
Revision as of 20:44, 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:
- "
{{BCP47|en}}" returns: "en"
- "
- Changes highly recommanded:
- "
{{BCP47|als}}" returns: "gsw" - "
{{BCP47|be-x-old}}" returns: "be-tarask" - "
{{BCP47|roa-rup}}" returns: "rup" - "
{{BCP47|simple}}" returns: "en" - "
{{BCP47|zh-classical}}" returns: "lzh"
- "
- Changes needed (currently using private use extension):
- "
{{BCP47|nrm}}" returns: "nrf" - "
{{BCP47|roa-tara}}" returns: "it-x-tara"
- "