Results 1 to 5 of 5

Thread: Switching QtCreator to English?

  1. #1
    Join Date
    Jul 2009
    Posts
    74
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Switching QtCreator to English?

    Is there a way to select the language QTCreator uses for menu and dialogs? Mine always starts in German, but I would prefer English.

    I've found no preferences where this might be changed.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Switching QtCreator to English?

    Some time ago there was a nasty workaround mentioned: rename the translation files.

  3. The following user says thank you to Lykurg for this useful post:

    Asperamanca (9th July 2009)

  4. #3
    Join Date
    Jul 2009
    Posts
    74
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Switching QtCreator to English?

    Quote Originally Posted by Lykurg View Post
    Some time ago there was a nasty workaround mentioned: rename the translation files.
    Ouch...that's really nasty!

    Based on what does QTCreator decide which language to run in? I have an English Windows XP installed, my Regional Settings are for my location (Austria), but the only time language is mentioned is for keyboard (yep, I have a german keyboard, but that should not affect application language), and Language for Non-Unicode-Programs (I certainly hope QTCreator is a Unicode program!)

    So...how does QTCreator divine that it should really run in German?

  5. #4

    Default Re: Switching QtCreator to English?

    From qlocale.cpp:

    #ifndef QT_NO_SYSTEMLOCALE
    static QByteArray envVarLocale()
    {
    static QByteArray lang = 0;
    #ifdef Q_OS_UNIX
    lang = qgetenv("LC_ALL");
    if (lang.isNull())
    lang = qgetenv("LC_NUMERIC");
    if (lang.isNull())
    #endif
    lang = qgetenv("LANG");
    return lang;
    }


    which means that if LC_ALL is not set then the value of LC_NUMERIC is used which is standard according to man 7 locale (which I think is a little sick because you cannot set things like number formats or monetary formats and have a different language).

    .....
    If the second argument to setlocale(3) is empty string, "", for the default locale, it is determined using the following steps:
    1. If there is a non-null environment variable LC_ALL, the value of LC_ALL is used.
    2. If an environment variable with the same name as one of the categories above exists and is non-null, its value is used for that category.
    3. If there is a non-null environment variable LANG, the value of LANG is used.
    ....

    so a workaround seems to be to set a different LC_NUMERIC value

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

    Default Re: Switching QtCreator to English?

    This works only on Unix. On Windows it seems one should use LANG.
    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.


Tags for this Thread

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.