Results 1 to 6 of 6

Thread: QFileDialog's Translation

  1. #1
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default QFileDialog's Translation

    Hi

    I want to translate QFileDialog into German. i used


    QString str = "qt_de" ;//+ QLocale::system().name();

    QTranslator qtTranslator;
    bool bloadapp = qtTranslator.load(str ,TranslatorPath);
    app.installTranslator(&qtTranslator);

    qt_de is the default .qm file provided by Qt.

    But problem is that all Qt's messages, button, menubar translated but QFileDialog's button like New Folder, Save, Open is not translated.

    Somebody told that use flag QFileDialog:ontUseNativeDialog

    So I Used like this

    QString str = QFileDialog::getExistingDirectory(this,"Open","/Volumes/",QFileDialog::QFileDialog:ontUseNativeDialog) ;

    Yeah Its translated,,but sometimes its crashes happens while Browse.

    Is there any other way instead of QFileDialog:ontUseNativeDialog.
    Last edited by wysota; 9th February 2011 at 20:08.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QFileDialog's Translation

    Contents of the native dialog are out of reach for Qt. You need to find out what is required by the native dialog provider (like MacOS, KDE, Gnome, etc.) to translate the entries in the dialog.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QFileDialog's Translation

    Hi

    Is there other way to translate QFileDialog without using QFileDialogontUseNativeDialog
    for below:
    QString str = QFileDialog::getExistingDirectory(this,"Open","/Volumes/",QFileDialogontUseNativeDialog) ;

    QString str = "qt_de" ;//+ QLocale::system().name();

    QTranslator qtTranslator;
    bool bloadapp = qtTranslator.load(str ,TranslatorPath);
    app.installTranslator(&qtTranslator);

    qt_de is the default .qm file provided by Qt.

    Kindly reply this.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QFileDialog's Translation

    Which part of my previous reply you didn't understand?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QFileDialog's Translation

    Quote Originally Posted by wysota View Post
    Which part of my previous reply you didn't understand?

    ontents of the native dialog are out of reach for Qt. You need to find out what is required by the native dialog provider (like MacOS, KDE, Gnome, etc.) to translate the entries in the dialog.

    Hi

    As u told, contents of the native dialog are out of reach for Qt. I have not much idea about MacOS's Native Dialog. Kindly tell me some syntax/example code for translate QFileDialog.

    Thanks
    Santosh

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QFileDialog's Translation

    I have told you that QFileDialog can't translate the native dialog. You either use the non-native one or have to ask your OS to provide a translated native dialog for you.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QFileDialog's Translation in MacOSX 10.6
    By santosh.kumar in forum Qt Programming
    Replies: 0
    Last Post: 7th February 2011, 06:14
  2. Translation of UI
    By elizabeth.h1 in forum Qt Programming
    Replies: 1
    Last Post: 2nd November 2009, 11:01
  3. QFileDialog/ QMessageBox's Button Translation problem
    By santosh.kumar in forum Qt Programming
    Replies: 6
    Last Post: 10th August 2009, 07:07
  4. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  5. Translation
    By merlvingian in forum Qt Programming
    Replies: 1
    Last Post: 14th August 2007, 17:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.