diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2008-01-23 17:04:36 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2008-01-23 17:04:36 +0000 |
commit | 5e600005bf6368a8f46e69f961e347e5e17bd215 (patch) | |
tree | 03c417000569c82808a4d09da2a6fea965f95c0d /Master/tlpkg/TeXLive | |
parent | c5ac0f908bc4a74f630ac1548294e1d312303713 (diff) |
Added function reg_country() to TLWinGoo which is a two-letter
country code representing the locale of the current user. Test added
to wingoo-demo.pl.
git-svn-id: svn://tug.org/texlive/trunk@6379 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLWinGoo.pm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm index de2f6255b60..2acaf622950 100644 --- a/Master/tlpkg/TeXLive/TLWinGoo.pm +++ b/Master/tlpkg/TeXLive/TLWinGoo.pm @@ -24,6 +24,7 @@ C<TeXLive::TLWinGoo> -- Additional utilities for Windows TeXLive::TLWinGoo::wg_error; TeXLive::TLWinGoo::admin; + TeXLive::TLWinGoo::reg_country; TeXLive::TLWinGoo::dir_writable($d); TeXLive::TLWinGoo::expand_string($s); TeXLive::TLWinGoo::global_tmpdir; @@ -48,6 +49,7 @@ BEGIN { @EXPORT = qw( &wg_error &admin + ®_country &dir_writable &expand_string &global_tmpdir @@ -145,6 +147,21 @@ sub admin { return $is_admin; } =pod +=item C<reg_country> + +Two-letter country code representing the locale of the current user + +=cut + +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}; +} + +=pod + =item C<dir_writable> Tests whether its argument is writable by trying to write to |