Community Wishlist Survey 2021/Citations/Hide native language codes from references

From Meta, a Wikimedia project coordination wiki

Hide native language codes from references

  • Problem: When e.g. automatically generating references from URL or ISBN the language code is added automatically, and is often identical to the native wikipedia language. In that case e.g. (nl) is still displayed as a prefix in the reference in the w:nl: Wikipedia, which is annoying for the reader.
  • Who would benefit: The writer is not supposed to remove redundant language codes, references can be easily copied to other language Wikipedias, the reader is never overloaded with unnecessary reference language prefixes.
  • Proposed solution: Conditionally show the language prefix: filter all matching codes, and show only "non-native" language codes, e.g. (en) and (fr) for w:nl:, so hiding (nl)
  • More comments: Folding should be applied; same i.e. language code "nl_be" etc. would match "nl"
  • Phabricator tickets:
  • Proposer: Geert Van Pamel (WMBE) (talk) 21:08, 19 November 2020 (UTC)[reply]

Discussion

TL;DR: Can be done with using {{PAGELANGUAGE}} in the template and hide the language if there is a match.
When automatically generating references, both in VisualEditor and the source editor, templates are used. In VisualEditor these are specifed on MediaWiki:Citoid-template-type-map.json, in the source editor that is usually via RefTools, in MediaWiki:RefToolbarConfig.js. On nl.wikipedia it would be a matter of editing the "Citeer boek" and other cite templates which support ISBN or URL like the TL;DR in my comment states. If anything, this lengthy explaination makes the solution seem more complicated than it is.--Snaevar (talk) 16:28, 20 November 2020 (UTC)[reply]

This is already done on English Wikipedia citations. Update your citation modules. :) --Izno (talk) 15:18, 11 December 2020 (UTC)[reply]

Note: "nl_be" isn't a valid language code; it would be "nl-BE".  — SMcCandlish ¢ >ʌⱷ҅ʌ<  05:16, 15 December 2020 (UTC)[reply]

Voting