Steps to replicate the issue (include links if applicable):
- Find or create an item with a zh-hant label and an en label but no zh-tw label, e.g. https://test.wikidata.org/wiki/Q195860
- Set your Babel box {{#babel:zh-tw|zh-hant|zh|en}}
- Set the user interface to zh-tw
- Go to a standard MediaWiki page like "What links here", e.g. https://test.wikidata.org/wiki/Special:WhatLinksHere/Q195860?uselang=zh-tw
What happens?:
The links back to the item use the en label.
What should have happened instead?:
The links back to the item use the zh-hant label.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
It appears to use the values for each level in the Babel box in alphabetical order.
It doesn't take fallback languages or language variants into account, even when those codes are explicitly included.
This means we currently cannot rely on language fallback as a way to handle country variants.