Fsharp: Option to make the compiler use english error messages

Created on 23 Jan 2018  路  8Comments  路  Source: dotnet/fsharp

For some reason the compiler now uses localized error messages. We need a flag to disable that and use the english versions. Otherwise it's hard to google or to ask on stackoverflow.

Most helpful comment

@ forki
The option you need is already in the product:

use: fsc --preferreduilang:us-EN

in projects add $(OtherFlags);--preferreduilang:us-EN

There is a bug, it doesn't seem to set it for FSI, and that needs to be fixed.

````
fsc.exe" --preferreduilang:de-DE
Microsoft (R) F# Compiler version 10.1.0 for F# 4.1
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

error FS0207: Keine Eingaben angegeben.

fsc.exe" --preferreduilang:us-EN
Microsoft (R) F# Compiler version 10.1.0 for F# 4.1
Copyright (c) Microsoft Corporation. All Rights Reserved.

error FS0207: No inputs specified

````

Kevin

All 8 comments

Not only do we need the flag but the default should always be English. The flag then can be used to explicitly select for a non english version

@forki When you say "the compiler" you mean the compiler you get when you build this repo and/or install a VSIX built from this repo?

With regard to ultimate packagings, my understanding is that nothing has changed:

  • The Microsoft Visual F# installation of the F# compiler always used localized messages.
  • The Mono installation does not use localized messages (though it would be reasonable to enable it if it did).

BTW I expect that for some audiences (e.g. Chinese) defaulting to localized is a very good thing for growing F# adoption.

It's a very recent thing that I see localized messages at all. maybe before we just had a bug somewhere so that they never reached us ;-)

@dsyme for me it happens on windows/rider so it does not seem to be a platform issue

@ forki
The option you need is already in the product:

use: fsc --preferreduilang:us-EN

in projects add $(OtherFlags);--preferreduilang:us-EN

There is a bug, it doesn't seem to set it for FSI, and that needs to be fixed.

````
fsc.exe" --preferreduilang:de-DE
Microsoft (R) F# Compiler version 10.1.0 for F# 4.1
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

error FS0207: Keine Eingaben angegeben.

fsc.exe" --preferreduilang:us-EN
Microsoft (R) F# Compiler version 10.1.0 for F# 4.1
Copyright (c) Microsoft Corporation. All Rights Reserved.

error FS0207: No inputs specified

````

Kevin

Closing this since it does existing, and linking this issue in the docs to track adding it there: https://github.com/dotnet/docs/issues/4183

@KevinRansom Should we create an issue for FSI here as well?

@cartermp Yes, I will try to get to it today. Localization is a big deal in some areas ....

Was this page helpful?
0 / 5 - 0 ratings