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

Ensure C# exceptions are English #10

Open
RedMser opened this issue Nov 13, 2024 · 1 comment
Open

Ensure C# exceptions are English #10

RedMser opened this issue Nov 13, 2024 · 1 comment
Labels
bug Something isn't working cli C# command line tool gui Godot GUI tool. help wanted Extra attention is needed

Comments

@RedMser
Copy link
Owner

RedMser commented Nov 13, 2024

Our GUI checks some error messages to detect what happened (e.g. "is being used by another process" IO error).

A non-english system will use non-english error messages I believe, so these checks would fail. Needs testing since I'm not sure if this changed with newer .NET versions.

Ideally all errors are set to be english, also so that bug reporting is easier.

@RedMser RedMser added bug Something isn't working help wanted Extra attention is needed cli C# command line tool gui Godot GUI tool. labels Nov 13, 2024
@RedMser RedMser changed the title Ensure C# exceptions are not localized Ensure C# exceptions are English Nov 13, 2024
@RedMser
Copy link
Owner Author

RedMser commented Nov 23, 2024

I tried following code and the exception was still in English:

Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE");
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("de-DE");
CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("de-DE");

int[] numbers = new int[] { 1, 2, 3 };
int result = numbers[-1];

Might be different in .NET 8.0 but it's really hard to find info about this topic online. If anyone with a non-English system can experiment, it would help me a lot. Maybe it's all-English by default and nothing needs to be done??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli C# command line tool gui Godot GUI tool. help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant