Page MenuHomePhabricator

momentjs does not support zh zh-hans zh-hant?
Closed, DuplicatePublic

Description

Language setting like these,

$wgLanguageCode = "zh";
$wgDefaultLanguageVariant = "zh-cn";
$wgDisabledVariants = array( 'zh-hans', 'zh-hant', 'zh-hk', 'zh-mo', 'zh-my', 'zh-sg' );

and currently, only user set their language to zh-cn, zh-tw show correct time in local language. All other zh & zh-xx setting will show English time.

Event Timeline

Zoglun raised the priority of this task from to Lowest.
Zoglun updated the task description. (Show Details)
Zoglun added a subscriber: Zoglun.

I'm not sure exactly what problem you are describing. Do you mean one of these?

  1. ResourceLoader modules such as momentjs do not support MediaWiki's language fallback chain?
  1. Some zh-xx variants work, but not all? Do they work normally for MediaWiki interface messages? Or is it specific to ResourceLoader?
  1. Moment.js has custom messages for some zh-cn and zh-tw variants, but not all. In that case, this should be a request for upstream Moment.js. http://momentjs.com/ - https://github.com/moment--locale - https://github.com/moment/moment/issues

Yes and thank you Krinkle,

only zh-cn and zh-tw variants work for MediaWiki interface messages, not others.