This repository was archived by the owner on Apr 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,6 @@ private static void InitializeProcess()
199199 // see the .NET Core Notes in https://msdn.microsoft.com/en-us/library/system.diagnostics.process(v=vs.110).aspx
200200 Encoding . RegisterProvider ( CodePagesEncodingProvider . Instance ) ;
201201
202- // Honor UI language customization
203202 UILanguageOverride . Setup ( ) ;
204203 }
205204
Original file line number Diff line number Diff line change @@ -15,15 +15,20 @@ internal static class UILanguageOverride
1515 public static void Setup ( )
1616 {
1717 CultureInfo language = GetOverriddenUILanguage ( ) ;
18- if ( language = = null )
18+ if ( language ! = null )
1919 {
20- return ;
20+ ApplyOverrideToCurrentProcess ( language ) ;
21+ FlowOverrideToChildProcesses ( language ) ;
2122 }
23+ }
2224
23- // Make the current process respect the override.
25+ private static void ApplyOverrideToCurrentProcess ( CultureInfo language )
26+ {
2427 CultureInfo . DefaultThreadCurrentUICulture = language ;
28+ }
2529
26- // Pass down the override to other processes that we start via appropriate environment variables
30+ private static void FlowOverrideToChildProcesses ( CultureInfo language )
31+ {
2732 // Do not override any environment variables that are already set as we do not want to clobber a more granular setting with our global setting.
2833 SetIfNotAlreadySet ( DOTNET_CLI_UI_LANGUAGE , language . Name ) ;
2934 SetIfNotAlreadySet ( VSLANG , language . LCID ) ; // for tools following VS guidelines to just work in CLI
You can’t perform that action at this time.
0 commit comments