Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:BCP47/doc: Difference between revisions

Template page
Line 17: Line 17:
** "<code><nowiki>{{BCP47|roa-rup}}</nowiki></code>" returns: "{{BCP47|roa-rup}}"
** "<code><nowiki>{{BCP47|roa-rup}}</nowiki></code>" returns: "{{BCP47|roa-rup}}"
* Changes required by BCP47, currently using private-use extensions:
* Changes required by BCP47, currently using private-use extensions:
** "<code><nowiki>{{BCP47|nl-informal}}</nowiki></code>" returns: "{{BCP47|nl-informal}}"
** "<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}}"

Revision as of 06:50, 19 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|nl-informal}}" returns: "nl"
    • "{{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"
Cookies help us deliver our services. By using our services, you agree to our use of cookies.