Menu

#2954 Set default language to System Language ID

2.16.0
open-accepted
nobody
None
5
2014-03-27
2010-06-14
Tim Gerundt
No

The patch #3014912 <http://winmerge.org/patch/3014912/> will add the setting of the default language also to the MSI setup. Both setups will write the Windows System Language ID to

HKLM and WinMerge will copy it to HKCU on the first start. So if possible will start WinMerge in the user language and not always in English.

This works for users of the SETUPS, but what is with ZIP users? Why not use the System Language ID as default language instead of English? If we

don't have a WinMerge language in this system language, WinMerge will fall back to English.

And if stand in HKLM a other language (from installer or admin) it will still override the HKCU value.

The following code seems to work:

Index: Src/OptionsInit.cpp

--- Src/OptionsInit.cpp (Revision 7193)
+++ Src/OptionsInit.cpp (Arbeitskopie)
@@ -36,8 +36,8 @@

m\_pOptions-&gt;SetRegRootKey\(\_T\("Thingamahoochie\\\WinMerge\\\"\)\);

- // Default language to English unless installer set it otherwise
- m_pOptions->InitOption(OPT_SELECTED_LANGUAGE, 0x409);
+ // Default language to System Language ID unless installer set it otherwise
+ m_pOptions->InitOption(OPT_SELECTED_LANGUAGE, (int)GetSystemDefaultLCID());

// Initialise options \(name, default value\)
m\_pOptions-&gt;InitOption\(OPT\_SHOW\_UNIQUE\_LEFT, true\);

Greetings,
Tim

Discussion

  • Tim Gerundt

    Tim Gerundt - 2010-06-14

    patch file

     
  • Kimmo Varis

    Kimmo Varis - 2010-06-14

    ZIP users are on their own anyway and we should not try to automate things just for them. They may need to setup many other things too so selecting correct language is not such a big barrier anymore.

     
  • Christian List

    Christian List - 2013-02-28
    • milestone: Trunk --> 2.16.0
     
  • Christian List

    Christian List - 2013-02-28

    This may not be a big issue, but it is a nice little enhancement that we might as well include.

     
  • Christian List

    Christian List - 2013-03-17

    Committed to trunk at revision 7613

     
  • Christian List

    Christian List - 2013-03-17
    • status: open --> open-accepted
     

Log in to post a comment.