Template:BCP47/doc
Template page
More actions
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"
- "