Results 1 to 3 of 3

Thread: Translation Rules for Plurals for not supported languages

  1. #1
    Join Date
    Feb 2011
    Posts
    7
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Translation Rules for Plurals for not supported languages

    Hello,

    I have seen in http://doc.qt.nokia.com/latest/i18n-plural-rules.html that Qt provide help to translate phrases with integer values to make a singular or plural translations in function of value.

    Qt has a plural rules defined for some language, but I would like to do my on rules for plurals for Catalan, and Spanish Language that I have seen that haven't plurals rules defined.

    Is there a way to define my own plural rules for translations ?

    Thanks

  2. #2
    Join Date
    May 2008
    Posts
    155
    Thanked 15 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Translation Rules for Plurals for not supported languages

    There's

    static const char * const catalanForms[] = { "Singular", "Undecal (11)", "Plural", 0 };

    with
    "nplurals=3; plural=(n==1 ? 0 : (n==11 || n/1000==11 || n/1000000==11 || n/1000000000==11) ? 1 : 2);"

    Is that wrong?

  3. #3
    Join Date
    Feb 2011
    Posts
    7
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Translation Rules for Plurals for not supported languages

    This translation rule is incorrect. In catalan doesn't exist undecal Rule, I believe that in catalan the translation rule has to be:

    "nplurals=3; plural=(n==0 ? 0 : (n==1) ? 1 : 2);" or "nplurals=2; plural=(n==0 ? 0 : 1);"

    I will ask to catalan grammar expert which is the correct rule.

Similar Threads

  1. SLOT naming rules
    By George Neil in forum Qt Programming
    Replies: 2
    Last Post: 11th November 2010, 08:08
  2. Expansion rules for a blank widget
    By dohzer in forum Newbie
    Replies: 4
    Last Post: 12th August 2010, 16:07
  3. installed languages
    By bhavyasg in forum Qt Programming
    Replies: 1
    Last Post: 17th July 2009, 20:17
  4. Build rules: Please assist
    By locus in forum General Programming
    Replies: 1
    Last Post: 4th April 2007, 07:15

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.