[Interest] Translating plural with is/are

Till Oliver Knoll till.oliver.knoll at gmail.com
Mon Mar 7 20:00:19 CET 2016



> Am 07.03.2016 um 19:56 schrieb Jason H <jhihn at gmx.com>:
> 
> 
>> 
>> If you provide a translation file, the message with %n will be translated 
>> according to the language's plural rules. For English, you'll have two 
>> translations for the same source message.
>> 
>>    "At least one upper case character is required" (a)
>>    "At least %n upper case characters are required" (b)
>> 
>> QTranslator takes care to apply the correct selection based on the number that 
>> you passed.
> 
> Ok I'm getting there, but how do I specify this string (a) or that string (b)?
> What's the qsTr() line look like?
> qsTr( ? )

http://doc.qt.io/qt-5/i18n-plural-rules.html

and

http://doc.qt.io/qt-5/i18n-source-translation.html

-> chapter Handling Plurals

Cheers,
  Oliver


More information about the Interest mailing list