Recently I'm working on a MediaWiki site with ULS and Translate extensions installed. The default content language of the site is en. I created a page in English, let's say, with the title Project:About. Then I translated the page into zh, with the hope that the language variant converter will do its own job. It works out well.
However, there is one thing that still bugs me. If I use MyLanguage redirect in the wikilink, i.e. Special:MyLanguage/Project:About, it will take me either to en or zh subpage, depending on my UI language. My current language setting is zh-cn, so I guess it would ultimately fallback to zh (esp. when I've taken a look at T50292). But I was kept taken to the English page.
After an investigation on File:MediaWiki_fallback_chains.svg, I surprisingly found that zh falls back to zh-hans, instead of the other way around, and the fallback chain is
- zh-CN -> zh-Hans -> en
- zh -> zh-Hans -> en
I'm not sure, but I guess that the reason why MW takes zh -> zh-hans fallback chain is that the translations of the MediaWiki software are either zh-hans, zh-hant (or zh-xxxx), but never zh alone. By taking this fallback, those who choose zh as their UI language will effectively see the UI in zh-hans. However, zh is a macro language, and IMO it should never be an option of UI language (I'm not talking about content language, which supports variant conversions).
So back to my problem, I'm just wondering if there is something I can do to fix this. Do I need to patch my MediaWiki code locally? And out of curiosity, why should zh falls back to zh-hans?