Page MenuHomePhabricator

Decide whether to make LanguageNameUtils able to support BCP 47 language tags
Open, Needs TriagePublic

Description

Currently, LanguageNameUtils only accept MediaWiki internal language codes as parameter.

However, it is supposed that LanguageNameUtils should be able to use BCP 47 language tags as parameter.

This also caused:

  • Duplicate language names in Names.php.
  • MediaWiki internal language codes instead of BCP 47 language tags being used (e.g., zh-cn vs. zh-Hans-CN/zh-hans-cn).
    • Wikibase show MediaWiki internal language codes instead of BCP 47 language codes.
  • Problem for language name on SVG language dropdown switcher (cannot show, e.g., zh-Hans-CN & show MediaWiki internal - als show gsw).

We should probably consider make LanguageNameUtils able to support BCP 47 language tags as parameter.

(abandoned option: change Names.php to BCP 47 language code)

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
OpenNone
DeclinedNone
InvalidNone
InvalidNone
StalledNone
StalledNone
InvalidNone
StalledNone
StalledNone
StalledNone
StalledNone
StalledFeatureNone
StalledNone
StalledFeatureNone
StalledFeatureNone
StalledFeatureNone
StalledNone
StalledNone
OpenNone
OpenNone
OpenNone
StalledNone
OpenNone
OpenNone
OpenNone
OpenBUG REPORTNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone

Event Timeline

Winston_Sung renamed this task from Decide to use BCP 47 language codes or MediaWiki internal codes for Names.php to Decide whether to use BCP 47 language codes or MediaWiki internal codes for Names.php.May 24 2023, 5:53 PM

My opinion is no. Only if we completely get rid of internal language codes. I like what the content transform team is doing with typed language codes (instead of just string) to avoid mixing them.

Winston_Sung renamed this task from Decide whether to use BCP 47 language codes or MediaWiki internal codes for Names.php to Decide whether to make LanguageNameUtils able to support BCP 47 language codes.Oct 30 2023, 2:32 PM
Winston_Sung updated the task description. (Show Details)

My opinion is no. Only if we completely get rid of internal language codes. I like what the content transform team is doing with typed language codes (instead of just string) to avoid mixing them.

Thanks for giving opinions.

The description of this ticket seems inaccurate. Languages have never been added to Names.php for Wikibase, as far as I know. Languages are added to $wmgExtraLanguageNames for Wikidata and Commons because it's not acceptable to add them to Names.php (for some unknown reason). It would be much simpler for Wikidata if things could be added to Names.php instead of needing a custom configuration, see T273627 (including the comments).

The duplicates in Names.php seem to be part of the general move towards using BCP47 codes (e.g. gsw was added in 2006, lzh in 2009, vro also in 2009, sgs in 2010 and rup in 2011 - all before Wikidata existed).

Winston_Sung renamed this task from Decide whether to make LanguageNameUtils able to support BCP 47 language codes to Decide whether to make LanguageNameUtils able to support BCP 47 language tags.Nov 4 2024, 8:31 AM
Winston_Sung updated the task description. (Show Details)
Winston_Sung updated the task description. (Show Details)