User:RobLa-WMF/Section links

From mediawiki.org

Copied from User:RobLa-WMF/RFC_incubator: For example, what is the stable link to the https://www.mediawiki.org/wiki/Requests_for_comment/Clickable_section_anchors#What_to_share.2Fcopy section of this RFC? Is there a way of turning that into https://www.mediawiki.org/wiki/Requests_for_comment/Clickable_section_anchors#sharing without changing the title of that section to "=== sharing ==="? One reason for wanting the anchor link is the anchor escape mechanisms make it a real pain to even remember a link. We have w:Template:Anchor (example no. 2), but that relies on a template, and may interfere with automatic section edit summaries. The template (as of this writing) is used on 40,000+ pages on enwiki. ( My request; T18691#2287985 and jayvdb's response: T18691#2287986 )

Quoting wikidata:Help:Sitelinks#Interlanguage_links_with_anchors

In the previous system of interlanguage links, an anchor link was used when a Wikimedia site did not have an exact match in another language for a corresponding page, but did have a page that dealt in part with the same subject. As discussed above, Wikidata does not support anchors as sitelinks, so interlanguage links with anchors must be retained locally on the Wikimedia sites (not Wikidata) if desired. [several examples]
An example of this in practice comes from the English Wikipedia page on "survival function". An equivalent page on "survival function" also exists on the  and , but there is no equivalent page for it on the French Wikipedia (instead, there is only a section of a page, , that covers the concept). While the "Languages" section on the left side menu of the  displays links for all languages, only the Spanish and Sudanese ones are provided by Wikidata via the item page for survival function (Q2915096). Since the link for French Wikipedia is a anchor, it is instead listed locally on the English Wikipedia in the wikitext itself.