summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLWinGoo.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLWinGoo.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLWinGoo.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm
index 2acaf622950..e72896a8bf9 100644
--- a/Master/tlpkg/TeXLive/TLWinGoo.pm
+++ b/Master/tlpkg/TeXLive/TLWinGoo.pm
@@ -72,6 +72,8 @@ BEGIN {
}
}
+use TeXLive::TLUtils;
+
#########################################
# Variables storing status information.
@@ -155,9 +157,13 @@ Two-letter country code representing the locale of the current user
sub reg_country {
my $value = $Registry -> {"CUser/Control Panel/International//Locale"};
- my $lm = $Registry -> Open("LMachine/SYSTEM/CurrentControlSet/Control/" .
- "Keyboard Layout/DosKeybCodes/", {Access => sys_access_permissions()});
- return $lm -> {$value};
+ $value = substr $value, -4;
+ my $lm = $Registry -> Open("HKEY_CLASSES_ROOT/MIME/Database/Rfc1766/",
+ {Access => KEY_READ()})->{"/$value"};
+ tllog($::LOG_DEBUG, "found lang codes value = $value, lm = $lm...\n");
+ if ($lm) {
+ return(substr $lm, 0, 2);
+ }
}
=pod