Tcl Source Code

Artifact [739c7b0dd1]
Login

Artifact 739c7b0dd19adc05766a4a5bdb638bf1493a1e78:

Attachment "msgcat.patch" to ticket [3036566fff] added by patthoyts 2010-07-29 19:33:04.
diff --git "a/\\\\UKNML4484\\c$\\Tcl\\Lib\\tcl8\\8.5\\msgcat-1.4.3.tm" "b/8.5\\msgcat-1.4.3.tm"
index 7d8d8c1..9aca2ac 100644
--- "a/\\\\UKNML4484\\c$\\Tcl\\Lib\\tcl8\\8.5\\msgcat-1.4.3.tm"
+++ "b/8.5\\msgcat-1.4.3.tm"
@@ -487,6 +487,20 @@ proc msgcat::Init {} {
 	return
     }
     #
+    # Check if the user has overridden the system language
+    # with an installed UI language pack (Windows 7)
+    #
+    set key {HKEY_CURRENT_USER\Control Panel\Desktop}
+    if {![catch {
+	set uilocale [registry get $key "PreferredUILanguages"]
+	ConvertLocale [string map {- _} [lindex $uilocale 0]]
+    } uilocale]} {
+	if {[string length $uilocale] > 0} {
+	    mclocale $uilocale
+	    return
+	}
+    }
+    #
     # Keep trying to match against smaller and smaller suffixes
     # of the registry value, since the latter hexadigits appear
     # to determine general language and earlier hexadigits determine