User:BlackcurrantTea/sandbox2

From Simple English Wikipedia, the free encyclopedia

Note to other people: if this is causing error messages somewhere (as, for example, adding a category name without a colon might do), please feel free to comment out parts of it.

draft of Template:Citation Style documentation/language/doc starting from a copy of en.wikipedia's page

CS1 and CS2 templates check what is in |language= with the language codes and names that MediaWiki (the Wikipedia software) can understand. This page lists the language codes and names that MediaWiki understands. Language name and code pairs marked with a super-scripted dagger () are codes / names that the software automatically replaces with codes / names defined in Module:Citation/CS1/Configuration. See §Replaced codes / names. Using language codes / names that are not in these lists will cause the software Module:Citation/CS1 to list the page in the maintenance category Category:CS1 maint: Unrecognized language‎.

2-character codes[change | change source]

See ISO 639-1.

3-character codes[change | change source]

IETF language tags[change | change source]

This list contains legitimate IETF language tags, tags that look like IETF tags but are not or are malformed, and 'codes' that are not codes. For these reasons, cs1|2 templates do not support IETF-like tags. When these tags are used in |language=, cs1|2 will attempt to extract the appropriate language-name from the string of characters that precede the first hyphen (if present).

Language names[change | change source]

This list contains legitimate IETF language tags, tags that look like IETF tags but are not or are malformed, and 'codes' that are not codes. For these reasons, cs1|2 templates do not support IETF-like tags and associated names. When these names are used in |language=, cs1|2 will attempt to validate them but such attempts are not likely succeed.

Replaced codes / names[change | change source]

Codes and names marked with a super-scripted dagger () are replaced by cs1|2:

  • Alemannisch – not an ISO 639 language name; when encountered, cs1|2 treats this as gsw Template:Llink
  • als – MediaWiki returns Alemannic (als is the subdomain for the Alemannisch Wikipedia: als.wikipedia.org); cs1|2 uses the ISO 639-3 definition: Template:Llink
  • bh – MediaWiki returns Bhojpuri (bh is the subdomain for the Bhojpuri Wikipedia: bh.wikipedia.org); cs1|2 uses a modified form of the ISO 639-1 definition: Template:Llink
  • Bhojpuri – ISO 639 language code for this language is bho; MediaWiki returns the Bihari languages code: bh; cs1|2 uses the correct code bho
  • bn – MediaWiki returns Bangla which is the language endonym; cs1|2 uses the ISO 639-3 definition (the exonym form): Template:Llink
  • crh – MediaWiki returns Crimean Tatar; cs1|2 uses the ISO 639-3 definition: Template:Llink
  • Valencian – not an ISO 639 language name; cs1|2 uses an IETF language tag ca-valencia, the Valencian variant of Catalan: Script error: The function "name_from_code" does not exist.