[Mediawiki-i18n] How do I find out on client-side whether the current language uses genders?

Santhosh Thottingal santhosh.thottingal at gmail.com
Sun Apr 20 04:20:51 UTC 2014


Depending on your context, adding an explicit 'mediawiki.user' resource
loader module dependency might save a later api call to server for gender.
That RL module will set the gender at mw.user and you can access by
mw.user.options.get( 'gender' )[1]


[1]
https://github.com/wikimedia/mediawiki-core/blob/master/includes/resourceloader/ResourceLoaderUserOptionsModule.php#L61

Thanks
Santhosh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/mediawiki-i18n/attachments/20140420/753f6188/attachment.html>


More information about the Mediawiki-i18n mailing list