[Qt-qml] QML, qsTr() and variable substitution
Artem Marchenko
artem.marchenko at gmail.com
Fri Oct 7 17:10:26 CEST 2011
Thanks, Juha!
Cheers,
Artem.
On Oct 6, 2011, at 12:23 PM, Juha Turunen wrote:
> On Thu, Oct 6, 2011 at 12:19 PM, Artem Marchenko
> <artem.marchenko at gmail.com> wrote:
>
>> How do you do the same in QML?
>> There is no standard way for templating JavaScript strings and to my
>> understanding Qt doesn't recommend any specific library for it. The what do
>> you do for QML localization?
>> Or is JavaScript's qsTr() is somehow able to care after the arguments on its
>> own?
>
> var dateHeader = qsTr("Downloading file %1 of
> %2").arg(fileNumber()).arg(totalNumberOfFiles())
> (from http://sf2011.meego.com/sites/all/files/slides/meego-localization_0.pdf)
>
> Juha
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
More information about the Qt-qml
mailing list