3 ms·
Qt takes care of that in a really nice way. You write tr("I scanned %1 directory.", "", count) and it takes cares of applying the correct translation with the
by tux3 12y ago
Qt takes care of that in a really nice way.
You write tr("I scanned %1 directory.", "", count) and it takes cares of applying the correct translation with the right plurals depending on the number.
http://doc.qt.digia.com/4.2/qobject.html#tr http://doc.qt.digia.com/4.2/qobject.html#tr
- ygra 12y agoYou need to use %n in that case.
- tedunangst 12y agoHow does that deal with the case where it should translate to "I didn't scan any directories"? According to the documentation, "In the translated version the variables must still appear." http://doc.qt.digia.com/4.2/linguist-translators.html http://doc.qt.digia.com/4.2/linguist-translators.html