ubuntu-touch-coreapps team mailing list archive
-
ubuntu-touch-coreapps team
-
Mailing list archive
-
Message #00019
[Calendar] Formatting dates and times
Hi,
I think it would be good if we could decide on how to do date and time formatting. The problem is that Qt.formateDate()-family of functions does not seem to handle language changes will the application is running.
Frank pointed out the Qt.locale() (http://qt-project.org/doc/qt-5.0/qtqml/qml-qtquick2-locale.html) function which returns a js object with properties and functions capable of formatting dates and times.
The Qt.locale() function can take one parameter, a locale name specified in the following format "language[_territory][.codeset][@modifier]".
With some luck we could use Qt.locale() together with i18n.language-property, depending on how the property's value looks like.
For example: Qt.locale(i18n.language).formateDate('MMMM')
Are there any SDK developer who can confirm if this is the case?
On the desktop, i18n.language was just an empty string
--
Mario Boikov