×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jun 2012
    Posts
    43

    loading .qm files from !:\resource\qt\translations\

    Hello,
    I am working on a Qt app (for Symbian only) and it's multilanguage.
    Currently the translations are embedded into the application .exe via QRC and work fine, but like other apps and offical Nokia stuff I want to store and load them from !:\resource\qt
    This works easily via postrules, but I don't know what I should write into the path of the QTranslator class, because it should work from install drive.
    Can somebody help me?

    Thans in advance
    Last edited by huellif; 2013-12-27 at 11:55.

  2. #2
    Registered User
    Join Date
    Jun 2012
    Posts
    43

    Re: loading .qm files from !:\resource\qt\translations\

    Ok solved:
    QString lang = QLocale::system().name();
    lang.truncate(2);
    QTranslator translator;
    QChar driveLetter = app.applicationFilePath().at(0);
    QString path = QString(driveLetter) + ":/resource/qt/translations";
    if (QFile::exists(path + "/myApp_" + lang + ".qm")) {
    translator.load("myApp_" + lang, path);
    app.installTranslator(&translator);
    }
    Last edited by huellif; 2013-12-27 at 11:54.

Similar Threads

  1. Translations files with Smart Installer
    By wcdmaxp in forum [Archived] Nokia Smart Installer for Symbian
    Replies: 4
    Last Post: 2011-02-05, 20:06
  2. loading strings from a resource file in QT
    By GuusDavidson in forum [Archived] Beginning Qt
    Replies: 5
    Last Post: 2011-02-04, 14:24
  3. Loading multiple resource files from an FEP
    By swastic in forum Symbian User Interface
    Replies: 5
    Last Post: 2006-09-06, 15:14
  4. Resource loading problem
    By Dess in forum Mobile Java General
    Replies: 0
    Last Post: 2003-05-22, 14:38
  5. Resource loading (problem?)
    By Dess in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2003-05-21, 09:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×