File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Microsoft.DotNet.Cli.Utils
dotnet/commands/dotnet-fsi Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ private static void FlowOverrideToChildProcesses(CultureInfo language)
54
54
/// </summary>
55
55
/// <returns>The custom language that was set by the user.
56
56
/// DOTNET_CLI_UI_LANGUAGE > VSLANG. Returns null if none are set.</returns>
57
- private static CultureInfo GetOverriddenUILanguage ( )
57
+ public static CultureInfo GetOverriddenUILanguage ( )
58
58
{
59
59
// DOTNET_CLI_UI_LANGUAGE=<culture name> is the main way for users to customize the CLI's UI language.
60
60
string dotnetCliLanguage = Environment . GetEnvironmentVariable ( DOTNET_CLI_UI_LANGUAGE ) ;
Original file line number Diff line number Diff line change 1
1
// Licensed to the .NET Foundation under one or more agreements.
2
2
// The .NET Foundation licenses this file to you under the MIT license.
3
3
4
+ using System . Globalization ;
5
+ using Microsoft . DotNet . Cli . Utils ;
6
+
4
7
namespace Microsoft . DotNet . Cli
5
8
{
6
9
public class FsiForwardingApp : ForwardingApp
7
10
{
8
11
private const string FsiDllName = @"FSharp/fsi.dll" ;
9
12
private const string FsiExeName = @"FSharp/fsi.exe" ;
10
13
11
- public FsiForwardingApp ( string [ ] arguments ) : base ( GetFsiAppPath ( ) , arguments )
14
+ static string [ ] processArguments ( string [ ] args )
15
+ {
16
+ var lang = UILanguageOverride . GetOverriddenUILanguage ( ) ;
17
+ if ( lang == null )
18
+ {
19
+ return args ;
20
+ }
21
+ else
22
+ {
23
+ return args . Append ( $ "--preferreduilang:{ lang . Name } ") . ToArray ( ) ;
24
+ }
25
+ }
26
+ public FsiForwardingApp ( string [ ] arguments ) : base ( GetFsiAppPath ( ) , processArguments ( arguments ) )
12
27
{
13
28
}
14
29
You can’t perform that action at this time.
0 commit comments