develooper Front page | perl.wxperl.users | Postings from March 2010

Re: Wx::gettext() and plural forms

Thread Previous
From:
Mattia Barbon
Date:
March 17, 2010 13:14
Subject:
Re: Wx::gettext() and plural forms
Message ID:
4BA1370F.9050300@libero.it
Zeno Gantner wrote:

   Hi,

> Wx::gettext() seems only to work in its simple form:
> 
> Wx::gettext('My message')
> 
> As it (at least I think so) should roughly correspond to
> wxGetTranslation - see

   Correct.

> http://docs.wxwidgets.org/stable/wx_stringfunctions.html#wxgettranslation
> for reference - it should also support the correct handling of plural
> forms:
> 
> Wx::gettext('%d thing', '%d things', n)
> 
> where n is the current number of things. This allows gettext to choose
> the right string for output, no matter how your language handles
> numbers.
> 
> This does not seem to be the case.
> 
> A pointer to where I can fix this would be appreciated, I don't mind
> fixing it myself ;-)

   Thanks for the offer, I was looking to give you some pointers, then I 
just did it... if you're interested have a look at XS/Locale.xs.

   The fix should work, but I haven't changed the wxDemo to exercise the 
change yet.


HTH,
Mattia

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About