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

Mark Holmquist mtraceur at member.fsf.org
Mon Apr 21 16:24:29 UTC 2014

On Sun, Apr 20, 2014 at 02:35:49PM +0300, Amir E. Aharoni wrote:
> I wouldn't do it per language, even though there are languages that hardly
> ever need gender, such as Hungarian ;)
> Perhaps it could be done per message - to have a function somewhere in
> jqueryMsg that quickly checks whether the parsed message would actually be
> different for different genders, and if it would be the same then not to do
> the API call. I guess that a simple regex that checks whether a message has
> a GENDER clause with more than one parameter is enough, but I might be
> wrong.

I think this is tgr's suggestion about parsing it with all possible genders
and then comparing. Doing it by parsing the message itself looking for
different GENDER parameters strikes me as being not terribly future-proof...

Mark Holmquist
Software Engineer, Multimedia
Wikimedia Foundation
mtraceur at member.fsf.org

More information about the Mediawiki-i18n mailing list