Page MenuHomePhabricator

Support differences between language codes and wiki domain names
Closed, ResolvedPublic

Description

We need to add redirection between language codes that are different from the wiki domain name.

  1. zh-yue -> yue
  2. zh-min-nan -> nan
  3. zh-classical -> lzh

Relevant discussion captured below:

From the feedback page:

zh-yue, zh-min-nan and zh-classical Wikipedia still have no timetable to be moved to yue, nan and lzh, but the tool is already using yue, nan and lzh, so the result does not display normally.

From Amir:

There are several languages where the code in the domain name is different from the language code. There is an intention to fix them all ( https://phabricator.wikimedia.org/T21986 ), but there is no timeline for it because there are several technical blockers, most notably https://phabricator.wikimedia.org/T114772 , and it's not clear when will they be fixed.

Without getting too deeply into the details, for these three languages the domain codes are zh-yue, zh-min-nan and zh-classical, while the language codes are yue, nan and lzh. The database codes are probably the same as the domain codes. I'm not sure what do you use in your code.

You can probably add some kind of redirection in your code. That's what most MediaWiki-related projects do when they have to deal with all Wikimedia's languages. Here's an example from ContentTranslation:

(search for "ContentTranslationDomainCodeMapping" in both files)

Resolving https://phabricator.wikimedia.org/T114772 may help the MediaWiki community get rid of this awfulness, but till then we have to do it. At the moment it's probably being resolved by Wikidata people, but it's unclear when will it be ready.