![]() |
2011-04-16
, 12:14
|
Posts: 435 |
Thanked: 769 times |
Joined on Apr 2010
|
#412
|
#include <QApplication> #include "mainwindow.h" #include <QtSystemInfo/QSystemInfo> #include <QTranslator> int main(int argc, char *argv[]) { QApplication a(argc, argv); QtMobility::QSystemInfo *systemInfo; QTranslator translator; if (systemInfo->currentLanguage() == "it") { translator.load("appname.it", "/opt/appname"); a.installTranslator(&translator); } MainWindow w; w.show(); return a.exec(); }
The Following User Says Thank You to gionni88 For This Useful Post: | ||
![]() |
2011-04-16
, 12:26
|
|
Posts: 417 |
Thanked: 200 times |
Joined on Apr 2010
@ Germany
|
#413
|
![]() |
2011-04-16
, 12:37
|
|
Posts: 2,448 |
Thanked: 9,523 times |
Joined on Aug 2010
@ Wigan, UK
|
#414
|
![]() |
2011-04-16
, 17:33
|
Posts: 739 |
Thanked: 114 times |
Joined on Sep 2009
|
#415
|
![]() |
2011-04-16
, 17:39
|
Posts: 2,829 |
Thanked: 1,459 times |
Joined on Dec 2009
@ Finland
|
#416
|
![]() |
2011-04-16
, 18:13
|
Posts: 250 |
Thanked: 44 times |
Joined on Jan 2010
|
#417
|
![]() |
2011-04-16
, 18:24
|
|
Posts: 249 |
Thanked: 217 times |
Joined on Jan 2011
@ United Kingdom
|
#418
|
![]() |
2011-04-16
, 18:45
|
|
Posts: 2,448 |
Thanked: 9,523 times |
Joined on Aug 2010
@ Wigan, UK
|
#419
|
Not sure if this happened to everyone but i can't click on comments and related videos to view them? This is the latest update
@marxian
are you still continuing the development of the older cutetube or are you moving on now with this one? so i can uninstall the older one...
I have installed successfully, even updated recently, logged successfully but nothing is working for me. Clicking on any of the icons results in "No Videos" message. I have CSSU, I also have original Cutetube installed. Is that an issue?
run-standalone.sh /opt/usr/bin/qmltube
The Following 4 Users Say Thank You to marxian For This Useful Post: | ||
![]() |
2011-04-16
, 19:56
|
Posts: 138 |
Thanked: 85 times |
Joined on Jun 2010
@ Finland
|
#420
|
![]() |
Tags |
cutetube, marxian = god, marxian legend, son of a gun, son of douche, son of fail, son of god, youtube |
|
I haven't used Qt translations before, so I was unaware (until late last night, when I found a Meego Wiki entry) of having to load the translation in the main.cpp file. According to the documentation on QML internationalisation, the QML runtime should find the .qm files automatically, so it seems that they missed out some vital info. :/
Introduction
The QML runtime automatically loads a translation from the i18n subdirectory of the root QML file, based on the system language. The translations are held in QM files that must be generated from TS files.
It should be fairly easy to make translation optional, but it may require a restart of the application for any changes to take effect.
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith
My website
GitHub
Last edited by marxian; 2011-04-16 at 11:43.