Results 1 to 8 of 8

Thread: Dynamic Language Switching

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Dynamic Language Switching

    Quote Originally Posted by jpn View Post
    It's done in code for the reason that usually you don't want a static hard coded language menu (done in designer) but rather a dynamic menu loaded according to detected language files. This way new language files can be added later without recompiling the application.
    I don't understand I'd like dynamic language switching, without necessity to rebuild application or run it again

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Dynamic Language Switching

    Quote Originally Posted by Salazaar View Post
    I don't understand I'd like dynamic language switching, without necessity to rebuild application or run it again
    You can do this with actions created in designer. You still might want to instantiate a QActionGroup or QSignalMapper in code instead of creating separate slots for each action. Then just switch the language according to the action (it's up to you whether you use text, objectName, data, or something else).

    However, I was talking about flexibility with adding new translations. If you create language actions in designer, you will have to add a new action and recompile the application if you later decide to add a new translation to your application.
    J-P Nurmi

Similar Threads

  1. Switching static to dynamic ui loading
    By s_a_white in forum Newbie
    Replies: 4
    Last Post: 26th June 2006, 15:57

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.