These provide control over copying the new locale to the system and default user accounts.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/SetWinLocale | 94 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 86 insertions(+), 8 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale index fa5f90cdbb..e544a580d3 100755 --- a/testbot/bin/SetWinLocale +++ b/testbot/bin/SetWinLocale @@ -310,7 +310,7 @@ sub CheckLocale($$) return undef; }
-my ($OptHostName, $OptShow, $OptReboot); +my ($OptHostName, $OptShow, $OptSysCopy, $OptDefCopy, $OptReboot); my ($OptDefault, $OptLocale, $OptCountry, $OptSystem, $OptUTF8, $OptMUI, $OptKeyboard); while (@ARGV) { @@ -323,6 +323,22 @@ while (@ARGV) { $OptShow = 1; } + elsif ($Arg eq "--sys-copy") + { + $OptSysCopy = 1; + } + elsif ($Arg eq "--no-sys-copy") + { + $OptSysCopy = 0; + } + elsif ($Arg eq "--def-copy") + { + $OptDefCopy = 1; + } + elsif ($Arg eq "--no-def-copy") + { + $OptDefCopy = 0; + } elsif ($Arg eq "--reboot") { if (defined $OptReboot and !$OptReboot) @@ -426,13 +442,32 @@ if (!defined $Usage) } }
- if (!$OptLocale and !$OptSystem and !$OptMUI and !$OptKeyboard and - !$OptCountry and !$OptUTF8 and !$OptShow) + if (!$OptLocale and !$OptCountry and !$OptSystem and !$OptUTF8 and + !$OptMUI and !$OptKeyboard and !defined $OptSysCopy and + !defined $OptDefCopy) + { + if (!$OptShow) + { + Error("you must specify at least one locale to change\n"); + $Usage = 2; + } + if (defined $OptReboot) + { + Error("--(no-)reboot can only be used when changing a locale\n"); + $Usage = 2; + } + } + if ($OptShow and ($OptLocale or $OptCountry or $OptSystem or $OptUTF8 or + $OptMUI or $OptKeyboard or defined $OptSysCopy or + defined $OptDefCopy or defined $OptReboot)) { - Error("you must specify at least one locale to change\n"); + Error("--show and the locale options are mutually incompatible\n"); $Usage = 2; }
+ $OptSysCopy = 1 if (!defined $OptSysCopy); + $OptDefCopy = 1 if (!defined $OptDefCopy); + # Two settings only take effect after a reboot: # - System locale changes. # - Display language changes only require a log out + log in but that cannot @@ -447,7 +482,7 @@ if (defined $Usage) exit $Usage; } print "Usage: $name0 [options] --show HOSTNAME\n"; - print "or $name0 [options] [--default DEF] [--locale LOC] [--country CTY] [--system SYS] [--utf8] [--mui MUI] [--keyboard KBD] [--no-reboot] HOSTNAME\n"; + print "or $name0 [options] [--default DEF] [--locale LOC] [--country CTY] [--system SYS] [--utf8] [--mui MUI] [--keyboard KBD] [--no-sys-copy] [--no-def-copy] [--no-reboot] HOSTNAME\n"; print "\n"; print "Sets the locale of the specified Windows machine.\n"; print "\n"; @@ -490,13 +525,32 @@ if (defined $Usage) print " . Only takes effect after a log out + log in.\n"; print " . Windows 10 GUI: Time & language -> Language -> Windows\n"; print " display language.\n"; - print " . APIs: GetSystemPreferredUILanguages(),\n"; + print " . APIs: GetSystemPreferredUILanguages() (--sys-copy case),\n"; print " GetUserDefaultUILanguage(), GetThreadUILanguage().\n"; print " . Powershell: Set-WinUILanguageOverride -Language MUI\n"; print " --keyboard KBD Specifies the keyboard layout (see --defaults).\n"; print " . Windows 10 GUI: Time & language -> Language -> Keyboard ->\n"; print " Override for default input method.\n"; print " . Powershell: Set-WinDefaultInputMethodOverride -InputTip KBD-ID\n"; + print " --sys-copy Copy the current locales (--locale --country --mui --keyboard)\n"; + print " to the system accounts (System/LocalSystem, NT Authority) and\n"; + print " in particular the one used by the logon screen. This is the\n"; + print " default.\n"; + print " . This requires elevated privileges.\n"; + print " . Windows 10 GUI: Time & language -> Language -> Administrative\n"; + print " language settings -> Copy Settings -> Welcome Screen and\n"; + print " system accounts.\n"; + print " . Powershell (Windows 11+): Copy-UserInternationalSettingsToSystem -WelcomeScreen $True\n"; + print " . Intl.cpl: CopySettingsToSystemAcct='true'\n"; + print " --no-sys-copy Do not copy the current locale to the system accounts such as\n"; + print " the one used by the logon screen.\n"; + print " --def-copy Copy the current locales (--locale --country --mui --keyboard)\n"; + print " to the default user account. This is the default.\n"; + print " . Windows 10 GUI: Time & language -> Language -> Administrative\n"; + print " language settings -> Copy Settings -> New user accounts.\n"; + print " . Powershell (Windows 11+): Copy-UserInternationalSettingsToSystem -NewUser $True\n"; + print " . Intl.cpl: CopySettingsToDefaultUserAcct='true'\n"; + print " --no-def-copy Do not copy the current locales to the default user account.\n"; print " --no-reboot Do not reboot Windows. Some locale changes only take effect\n"; print " after a reboot so this option should only be used for\n"; print " debugging.\n"; @@ -652,7 +706,7 @@ sub ShowWinSettings($) print "OEMCP (--utf8) = ", Value2Str($Settings->{OEMCP}), "\n";
print "\n"; - print ".DEFAULT account:\n"; + print ".DEFAULT account (see --sys-copy):\n"; # Locale used for the date and time in the logon screen print "Locale (--locale) = ", Value2Str($Settings->{DefLocale}), "\n"; print "LocaleName (--locale) = ", Value2Str($Settings->{DefLocaleName}), "\n"; @@ -772,11 +826,13 @@ $OptKeyboard ||= $OptDefault; # Generate the intl.cpl configuration #
+my $CopyToSys = $OptSysCopy ? "true" : "false"; +my $CopyToDef = $OptDefCopy ? "true" : "false"; my @Config = ( # intl.cpl does not want single quotes on that one line! "<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">", " gs:UserList", - " <gs:User UserID='Current' CopySettingsToDefaultUserAcct='true' CopySettingsToSystemAcct='true'/>", + " <gs:User UserID='Current' CopySettingsToDefaultUserAcct='$CopyToDef' CopySettingsToSystemAcct='$CopyToSys'/>", " </gs:UserList>", ); if (defined $CountryId) @@ -952,6 +1008,28 @@ if ($KeyboardIds) CheckSetting($Settings, "InputMethod", $KeyboardIds->[0], "for --keyboard $OptKeyboard", 1); }
+if ($OptSysCopy) +{ + if ($OptLocale) + { + CheckSetting($Settings, "DefLocale", "0000$LCIDLocale", "for --locale $OptLocale", 1); + CheckSetting($Settings, "DefLocaleName", $OptLocale, "for --locale $OptLocale"); + } + if ($OptCountry) + { + CheckSetting($Settings, "DefCountry", $CountryId, "for --country $OptCountry"); + CheckSetting($Settings, "DefCountryName", $OptCountry, "for --country $OptCountry"); + } + if ($OptMUI) + { + CheckSetting($Settings, "DefMachinePreferredUILanguages", $OptMUI, "for --mui $OptMUI"); + } + if ($KeyboardIds) + { + CheckSetting($Settings, "DefInputMethod", $KeyboardIds->[0], "for --keyboard $OptKeyboard", 1); + } +} + Cleanup(); exit(1) if (!$Success); Debug(Elapsed($Start), " All done!\n");
Also use RunAndWait() to simplify the code.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/SetWinLocale | 42 +++++++----------------------------- testbot/bin/SetWinLocale.ps1 | 29 +++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 36 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale index e544a580d3..b8908e6a0a 100755 --- a/testbot/bin/SetWinLocale +++ b/testbot/bin/SetWinLocale @@ -79,7 +79,7 @@ sub Cleanup() } else { - $TA->Rm("$name0.out", "$name0.ps1"); + $TA->Rm("$name0.out", "$name0.ps1", "$name0.xml"); } }
@@ -876,44 +876,18 @@ push @Config, "</gs:GlobalizationServices>"; # Change the Windows locale using intl.cpl #
-Debug(Elapsed($Start), join("\n", " Sending the configuration file\nlocales.xml:", @Config, "")); +Debug(Elapsed($Start), join("\n", " Sending the configuration file\n$name0.xml:", @Config, ""));
-if (!$TA->SendFileFromString(join("\r\n", @Config, ""), "locales.xml", 0)) +if (!$TA->SendFileFromString(join("\r\n", @Config, ""), "$name0.xml", 0)) { FatalError("could not send the configuration file:", $TA->GetLastError(), "\n"); }
-# For some reason this only works when run from a batch script! -Debug(Elapsed($Start), " Sending the batch file\n"); -my $Cmd = 'control.exe intl.cpl,,/f:"locales.xml"'; -if (!$TA->SendFileFromString($Cmd, "script.bat", $TestAgent::SENDFILE_EXE)) -{ - FatalError("could not send the batch file:", $TA->GetLastError(), "\n"); -} - -Debug(Elapsed($Start), " Running intl.cpl\n"); -my $Pid = $TA->Run(["./script.bat"], 0); -if (!$Pid) -{ - FatalError("failed to run intl.cpl\n"); -} - -# Unfortunately the control.exe and/or intl.cpl exit code is unusable so -# there is no way to check for errors -Debug(Elapsed($Start), " Waiting for intl.cpl\n"); -if (!defined $TA->Wait($Pid, 120)) -{ - FatalError("could not run intl.cpl: ", $TA->GetLastError(), "\n"); -} - -if ($Debug) -{ - print STDERR "Not deleting script.bat and locales.xml\n"; -} -else -{ - $TA->Rm("script.bat", "locales.xml"); -} +my $Cmd = ["powershell.exe", "-ExecutionPolicy", "ByPass", "-File", + "$name0.ps1", "locales", "$name0.xml"]; +Debug(Elapsed($Start), " Running ", join(" ", @$Cmd), "\n"); +my $Ret = $TA->RunAndWait($Cmd, 0, 120); +FatalError("$name0.ps1 locales failed: ", $TA->GetLastError(), "\n") if ($Ret < 0);
# diff --git a/testbot/bin/SetWinLocale.ps1 b/testbot/bin/SetWinLocale.ps1 index 702b3301dc..b893755ccb 100644 --- a/testbot/bin/SetWinLocale.ps1 +++ b/testbot/bin/SetWinLocale.ps1 @@ -1,4 +1,4 @@ -# Shows the Windows locale settings +# Shows or sets the Windows locale settings # # Copyright 2022 Francois Gouget # @@ -104,6 +104,27 @@ function ShowSettings() }
+# +# Modify the Windows locales settings +# + +function SetLocales($Argv) +{ + $XmlFile = $Argv[1] + $IntlArg = 'intl.cpl,,/f:"' + $XmlFile + '"' + Write-Output "Running: control.exe $IntlArg" + control.exe $IntlArg + # intl.cpl executes asynchronously which means that: + # - The exit code cannot be used to check for failures. + # - The configuration file should not be removed too early. + # - Further locale modifications (e.g. setting the code pages) should only + # be done after intl.cpl is done to avoid races. + # So 'wait' for intl.cpl to be done by introducing an arbitrary pause. + Start-Sleep 2 + exit 0 +} + + # # Main # @@ -111,17 +132,21 @@ function ShowSettings() function ShowUsage() { Write-Output "Usage: $Name0 settings" + Write-Output "or $Name0 locales XMLFILE" Write-Output "or $Name0 -?" Write-Output "" - Write-Output "Shows the Windows locales." + Write-Output "Shows or modifies the Windows locales." Write-Output "" Write-Output "Where:" Write-Output " settings Show the current Windows locale settings." + Write-Output " locales Modifies the locales by passing the $Name0.xml file to intl.cpl." + Write-Output " XMLFILE The filename of the intl.cpl XML configuration." Write-Output " -? Shows this help message." }
$Action = $args[0] if ($Action -eq "settings") { ShowSettings } +if ($Action -eq "locales") { SetLocales $args } $Rc = 0 if ($Action -and $Action -ne "-?" -and $Action -ne "-h" -and $Action -ne "help") {
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/SetWinLocale | 103 +++++--------------------- testbot/bin/SetWinLocale.ps1 | 136 +++++++++++++++++++++++++++++++++-- 2 files changed, 145 insertions(+), 94 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale index b8908e6a0a..2ff8348fb3 100755 --- a/testbot/bin/SetWinLocale +++ b/testbot/bin/SetWinLocale @@ -42,7 +42,6 @@ use WineTestBot::TestAgent; use WineTestBot::Utils;
my $HKCU_USER_PROFILE = "HKCU\Control Panel\International\User Profile"; -my $HKLM_CODE_PAGE = "HKLM\System\CurrentControlSet\Control\Nls\CodePage";
# @@ -53,6 +52,11 @@ my $name0 = $0; $name0 =~ s+^.*/++;
+sub Info(@) +{ + print STDERR "$name0:info: ", @_; +} + sub Warning(@) { print STDERR "$name0:warning: ", @_; @@ -612,19 +616,6 @@ sub RegGetValue($;$) return $Values->{defined $VName ? $VName : "(Default)"}; }
-sub RegSetValue($$$$) -{ - my ($Key, $VName, $Type, $Value) = @_; - - my $Cmd = ["reg.exe", "add", $Key, "/f"]; - push @$Cmd, (defined $VName ? ("/v", $VName) : ("/ve")); - $Value = join("\0", @$Value) if (ref($Value) eq "ARRAY"); - push @$Cmd, "/t" , $Type, "/d", $Value; - - my $Ret = $TA->RunAndWait($Cmd, 0, 10); - FatalError("@$Cmd failed: ", GetRunError($Ret), "\n") if ($Ret); -} -
# # Show the host's locale settings @@ -823,84 +814,22 @@ $OptKeyboard ||= $OptDefault;
# -# Generate the intl.cpl configuration +# Change the Windows locale #
-my $CopyToSys = $OptSysCopy ? "true" : "false"; -my $CopyToDef = $OptDefCopy ? "true" : "false"; -my @Config = ( - # intl.cpl does not want single quotes on that one line! - "<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">", - " gs:UserList", - " <gs:User UserID='Current' CopySettingsToDefaultUserAcct='$CopyToDef' CopySettingsToSystemAcct='$CopyToSys'/>", - " </gs:UserList>", -); -if (defined $CountryId) -{ - push @Config, " gs:LocationPreferences", - " <gs:GeoID Value='$CountryId'/>", - " </gs:LocationPreferences>"; -} -if ($OptMUI) -{ - push @Config, " gs:MUILanguagePreferences", - " <gs:MUILanguage Value='$OptMUI'/>", - " </gs:MUILanguagePreferences>"; -} -if ($OptSystem) -{ - push @Config, " <gs:SystemLocale Name='$OptSystem'/>"; -} -if ($KeyboardIds) -{ - push @Config, " gs:InputPreferences"; - my $Default = " Default='true'"; - foreach my $Id (@$KeyboardIds) - { - push @Config, " <gs:InputLanguageID Action='add' ID='$Id'$Default/>"; - $Default = ""; - } - push @Config, " </gs:InputPreferences>"; -} -if ($OptLocale) -{ - push @Config, " gs:UserLocale", - " <gs:Locale Name='$OptLocale' SetAsCurrent='true' ResetAllSettings='true'>", - " </gs:Locale>", - " </gs:UserLocale>"; -} -push @Config, "</gs:GlobalizationServices>"; - - -# -# Change the Windows locale using intl.cpl -# - -Debug(Elapsed($Start), join("\n", " Sending the configuration file\n$name0.xml:", @Config, "")); - -if (!$TA->SendFileFromString(join("\r\n", @Config, ""), "$name0.xml", 0)) -{ - FatalError("could not send the configuration file:", $TA->GetLastError(), "\n"); -} - my $Cmd = ["powershell.exe", "-ExecutionPolicy", "ByPass", "-File", - "$name0.ps1", "locales", "$name0.xml"]; -Debug(Elapsed($Start), " Running ", join(" ", @$Cmd), "\n"); -my $Ret = $TA->RunAndWait($Cmd, 0, 120); + "$name0.ps1", "locales", $OptLocale || ".", $CountryId || ".", + $OptSystem || ".", $OptUTF8 ? "true" : "false", $OptMUI || ".", + $KeyboardIds ? $KeyboardIds->[0] : ".", + $OptSysCopy ? "true" : "false", $OptDefCopy ? "true" : "false"]; +Debug(Elapsed($Start), " Running: ", join(" ", @$Cmd), "\n"); +my $Ret = $TA->RunAndWait($Cmd, 0, 30, undef, "$name0.out", "$name0.out"); FatalError("$name0.ps1 locales failed: ", $TA->GetLastError(), "\n") if ($Ret < 0); - - -# -# Change the code pages manually -# - -if ($OptUTF8) +my $Out = $TA->GetFileToString("$name0.out"); +foreach my $Line (split /\n/, $Out || "") { - # intl.cpl does not support setting a specific code page - foreach my $VName ("ACP", "MACCP", "OEMCP") - { - RegSetValue($HKLM_CODE_PAGE, $VName, "REG_SZ", "65001"); - } + $Line =~ s/\r$//; + Info("$Line\n"); }
diff --git a/testbot/bin/SetWinLocale.ps1 b/testbot/bin/SetWinLocale.ps1 index b893755ccb..afb60d6ee5 100644 --- a/testbot/bin/SetWinLocale.ps1 +++ b/testbot/bin/SetWinLocale.ps1 @@ -105,13 +105,65 @@ function ShowSettings()
# -# Modify the Windows locales settings +# Modify the Windows locales settings through intl.cpl #
-function SetLocales($Argv) +function WriteIntlCplConfig([string]$Locale, [string]$CountryId, [string]$System, [string]$MUI, [string]$KeyboardId, [bool]$SysCopy, [bool]$DefCopy) { - $XmlFile = $Argv[1] - $IntlArg = 'intl.cpl,,/f:"' + $XmlFile + '"' + # intl.cpl does not want single quotes on that first line! + Write-Output '<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">' + + Write-Output " gs:UserList" + $CopyToSys = if ($SysCopy) { "true" } else { "false" } + $CopyToDef = if ($DefCopy) { "true" } else { "false" } + Write-Output " <gs:User UserID='Current' CopySettingsToDefaultUserAcct='$CopyToDef' CopySettingsToSystemAcct='$CopyToSys'/>" + Write-Output " </gs:UserList>" + + if ($CountryId) + { + Write-Output " gs:LocationPreferences" + Write-Output " <gs:GeoID Value='$CountryId'/>" + Write-Output " </gs:LocationPreferences>" + } + + # Takes effect on the next log out + log in. + if ($MUI) + { + # Note that specifying something like en-CA instead of en-GB fails here. + # See the Set-WinUILanguageOverride comment above. + Write-Output " gs:MUILanguagePreferences" + Write-Output " <gs:MUILanguage Value='$MUI'/>" + Write-Output " </gs:MUILanguagePreferences>" + } + + # Takes effect on the next reboot. + if ($System) + { + Write-Output " <gs:SystemLocale Name='$System'/>" + } + + # Takes effect on the next log out + log in. + if ($KeyboardId) + { + Write-Output " gs:InputPreferences" + Write-Output " <gs:InputLanguageID Action='add' ID='$KeyboardId' Default='true'/>" + Write-Output " </gs:InputPreferences>" + } + + if ($Locale) + { + Write-Output " gs:UserLocale" + Write-Output " <gs:Locale Name='$Locale' SetAsCurrent='true' ResetAllSettings='true'>" + Write-Output " </gs:Locale>" + Write-Output " </gs:UserLocale>" + } + + Write-Output "</gs:GlobalizationServices>" +} + +function RunIntlCpl($XmlFilename) +{ + $IntlArg = 'intl.cpl,,/f:"' + $XmlFilename + '"' Write-Output "Running: control.exe $IntlArg" control.exe $IntlArg # intl.cpl executes asynchronously which means that: @@ -121,6 +173,64 @@ function SetLocales($Argv) # be done after intl.cpl is done to avoid races. # So 'wait' for intl.cpl to be done by introducing an arbitrary pause. Start-Sleep 2 +} + + +# +# Modify the Windows locales through Powershell +# + +function SetCodePages($Value) +{ + foreach ($CodePage in $CODE_PAGES) + { + Set-ItemProperty -Path $HKLM_CODE_PAGE -Name $CodePage -Type String -Value $Value + } +} + + +# +# The locale-change actions +# + +function GetStringArg($Arg) +{ + # Treat '.' as equivalent to an empty string for convenience + if ($Arg -ne ".") { $Arg } else { "" } +} + +function ShowIntlConfig($Argv) +{ + $Locale = GetStringArg($Argv[1]) + $CountryId = GetStringArg($Argv[2]) + $System = GetStringArg($Argv[3]) + # The UTF8 parameter is irrelevant here + $MUI = GetStringArg($Argv[5]) + $KeyboardId = GetStringArg($Argv[6]) + $SysCopy = $Argv[7] -ne "false" + $DefCopy = $Argv[8] -ne "false" + + WriteIntlCplConfig $Locale $CountryId $System $MUI $KeyboardId $SysCopy $DefCopy + exit 0 +} + +function SetLocales($Argv) +{ + $Locale = GetStringArg($Argv[1]) + $CountryId = GetStringArg($Argv[2]) + $System = GetStringArg($Argv[3]) + $UTF8 = $Argv[4] -eq "true" + $MUI = GetStringArg($Argv[5]) + $KeyboardId = GetStringArg($Argv[6]) + $SysCopy = $Argv[7] -ne "false" + $DefCopy = $Argv[8] -ne "false" + $UseIntlCpl = $Argv[9] -eq "true" + + WriteIntlCplConfig $Locale $CountryId $System $MUI $KeyboardId $SysCopy $DefCopy >"$Name0.xml" + RunIntlCpl "$Name0.xml" + Remove-Item -Path "$Name0.xml" + + if ($UTF8) { SetCodePages(65001) } exit 0 }
@@ -132,20 +242,32 @@ function SetLocales($Argv) function ShowUsage() { Write-Output "Usage: $Name0 settings" - Write-Output "or $Name0 locales XMLFILE" + Write-Output "or $Name0 intlconfig LOCALE COUNTRYID SYSTEM UTF8 MUI KEYBOARDID SYSCOPY DEFCOPY" + Write-Output "or $Name0 locales LOCALE COUNTRYID SYSTEM UTF8 MUI KEYBOARDID SYSCOPY DEFCOPY" Write-Output "or $Name0 -?" Write-Output "" Write-Output "Shows or modifies the Windows locales." Write-Output "" Write-Output "Where:" Write-Output " settings Show the current Windows locale settings." - Write-Output " locales Modifies the locales by passing the $Name0.xml file to intl.cpl." - Write-Output " XMLFILE The filename of the intl.cpl XML configuration." + Write-Output " intlconfig Generates an XML configuration file for intl.cpl." + Write-Output " locales Modifies the locales by invoking intl.cpl." + Write-Output " LOCALE Is the BCP-47 locale to use for formats, date and time." + Write-Output " COUNTRYID Is the numerical country code." + Write-Output " SYSTEM Is the BCP-47 locale to use as the system locale." + Write-Output " UTF8 If set to 'true' the code pages will be changed to UTF-8." + Write-Output " MUI Is the BCP-47 locale to use for the display language." + Write-Output " KEYBOARDID Is the keyboard identifier to set as the default." + Write-Output " SYSCOPY If 'true' the locale settings will be copied to the system accounts" + Write-Output " (such as used for the logon screen). This is the default." + Write-Output " DEFCOPY If 'true' the locale settings will be copied to the default account" + Write-Output " (for new users). This is the default." Write-Output " -? Shows this help message." }
$Action = $args[0] if ($Action -eq "settings") { ShowSettings } +if ($Action -eq "intlconfig") { ShowIntlConfig $args } if ($Action -eq "locales") { SetLocales $args } $Rc = 0 if ($Action -and $Action -ne "-?" -and $Action -ne "-h" -and $Action -ne "help")