[Merkaartor] Switching language is incomplete until restart

Moritz Barsnick barsnick at gmx.net
Tue Jun 1 15:50:19 BST 2010


On Sat, May 29, 2010 at 14:20:16 +0200, Chris Browet wrote:
> On Sat, May 29, 2010 at 13:31, Moritz Barsnick <barsnick at gmx.net> wrote:
>     my freshly installed Merkaartor (on Windows 7 Enterprise 64-bit) came
>     up in German for some reason. Well, anyway, I switched the language to
> I bet the reason is that your locale is set to German, isn't it?

Yes and no. I always thought it was an en_US installation, where I only
set the "formats" (date, currency, and number formats) to de_DE.  Most
programs come up in English by default (even if i18n'ized), some come
up in German, some are confused and do both.  ;-)

If I try to "uninstall languages" (Control Panel -> Clock, Language,
and Region -> Install or uninstall display languages), it only offers
to uninstall English.

The location (... -> Change location) claims to be United States.


Which exact setting would you be looking at? (Registry key probably.)

Looking at Merkaartor's source (why do I even have the time for this?
;->), it seems to do:
        lang = QLocale::system().name().split("_")[0];
(src/Preferences/MerkaartorPreferences.cpp, getDefaultLanguage())

Qt doc says:
  On Windows and Mac, this locale will use the decimal/grouping
  characters and date/time formats specified in the system configuration
  panel.

That documentation also refers to QTextCodec::locale(), which says:
  Returns a string representing the current language and sublanguage,
  e.g. "pt" for Portuguese, or "pt_br" for Portuguese/Brazil.

Somehow, the latter sounds more convincing to me.

I don't have a Windows compile environment set up, so I can't test the
difference (i.e. whether the latter provides "en_*" in my case). A
colleague does have one (incl. Qt BTW), so if you have example code (as
much of a project as possible without having to setup something
ourselves), I could test.

Thanks,
Moritz




More information about the Merkaartor mailing list