[Development] [Interest] Direct-lookup translation, even for English (was Re: get english translation)
Kobus Jaroslaw
Jaroslaw.Kobus at digia.com
Wed Sep 3 08:25:06 CEST 2014
> Actually, some of the i18n features of Qt _requires_ you to provide an English translation.
> This is the case for the plural forms, where the engineer typically writes.
> tr("Found %n item(s)", 0, m_numberOfItemsFound);
> And Qt will pick the singular/plural translation (that came from the translation file)
> depending on the value of m_numberOfItemsFound.
Can't we just provide some tr() overload, in which you could also specify plural and paucal forms in source code, next to the number? E.g.
tr("Found %n item" /*singular*/, "Found %n items" /*paucal*/, "Found %n items" /*plural*/, m_numberOfItemsFound);
In this way the English in the source code could be good enough.
Jarek
More information about the Development
mailing list