Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot switch the FSI language to english #16146

Closed
blfuentes opened this issue Oct 19, 2023 · 4 comments · Fixed by dotnet/sdk#40302
Closed

Cannot switch the FSI language to english #16146

blfuentes opened this issue Oct 19, 2023 · 4 comments · Fixed by dotnet/sdk#40302
Assignees
Labels
Area-FSI Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone

Comments

@blfuentes
Copy link

blfuentes commented Oct 19, 2023

I have installed net core 7.0.402 in an OS with language settings in Spanish but without any language pack installed, so the dotnet sdk should be in english.
I have added the environment variable to force dotnet to run with english locale:
image
So far, this seems to work for running dotnet commands (I am leaving an error to show that the msbuild reports the errors and are displayed in english:
image
But whenever I execute dotnet fsi, the fsi interactive terminal switches to my OS language(Spanish)
image
image

Can I somehow change the FSI interactive language to use also english?

I found a workaround #https://github.com/dotnet/msbuild/issues/1596#issuecomment-738722213
Basically, delete the {locale} folder within the sdk/{version}/fsharp/{locale}
OS System: Windows 10 22h2 build 19045.3570
netcore Version 7.0.402

Thanks!

@github-actions github-actions bot added this to the Backlog milestone Oct 19, 2023
@vzarytovskii
Copy link
Member

I don't think we have a way, other than setting language for current console, @KevinRansom?

@baronfel
Copy link
Member

I think the correct way to do this would be in the 'dotnet fsi' wrapper command in the dotnet/sdk repo, since this is a question of making an SDK convention apply to a tool that ships as part of the SDK. If there's a known flag/argument for controlling locale then we can set it in that wrapper before invoking the FSI assembly. This is how many integrations (Nuget, format, etc) already happen in the SDK.

@T-Gro T-Gro added Area-FSI Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. and removed Needs-Triage labels Oct 23, 2023
@KevinRansom KevinRansom modified the milestones: Backlog, April-2024 Apr 19, 2024
@KevinRansom
Copy link
Member

fsi has a command line option --preferreduilang to set the current language
dotnet-fsi --preferreduilang:es-ES
in your case:
dotnet-fsi --preferreduilang:en-EN

There is no persistent way of specifying this other than using the Operating System settings.

I have tested a fix that I will submit to the dotnet sdk:

C:\kevinransom\sdk\artifacts\bin\redist\Debug\dotnet>dotnet fsi

Microsoft (R) F# interactivo, versión 12.8.400.0 for F# 8.0
Copyright (C) Microsoft Corporation. Todos los derechos reservados.

Para obtener ayuda, escriba #help;;

> #quit;;

C:\kevinransom\sdk\artifacts\bin\redist\Debug\dotnet>set DOTNET_CLI_UI_LANGUAGE=en-En

C:\kevinransom\sdk\artifacts\bin\redist\Debug\dotnet>dotnet fsi

Microsoft (R) F# Interactive version 12.8.400.0 for F# 8.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

For help type #help;;

> #quit;;

C:\kevinransom\sdk\artifacts\bin\redist\Debug\dotnet>set DOTNET_CLI_UI_LANGUAGE=

C:\kevinransom\sdk\artifacts\bin\redist\Debug\dotnet>dotnet fsi

Microsoft (R) F# Interactive version 12.8.400.0 for F# 8.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

For help type #help;;

> #quit;;

C:\kevinransom\sdk\artifacts\bin\redist\Debug\dotnet>set DOTNET_CLI_UI_LANGUAGE=es-Es

C:\kevinransom\sdk\artifacts\bin\redist\Debug\dotnet>dotnet fsi

Microsoft (R) F# interactivo, versión 12.8.400.0 for F# 8.0
Copyright (C) Microsoft Corporation. Todos los derechos reservados.

Para obtener ayuda, escriba #help;;

>

@blfuentes
Copy link
Author

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-FSI Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants