I have an application where I catch exceptions and show the message text to the user as part of the error message. Allthough RAD Studio (10.1) is set to English and the Locale ID is set to 409 English in the Version Info options for all Targets the error message is output in German. This happens both on a German Windows 10 and other Windows machines with other languages, even a Japanese customer got this.
The exception is a system exception like failed to open file, file not found, but it seems it happens on all kind of exceptions that I do not raise with my own message text.
The project has been migrated from Delphi 2007 recently and I had to do some manual clean up in the project files regarding the version numbers. But checking the Locale in the project file reveals no surprise: 1033 -> $0409 - English.
Where could be the reason for the German messages?
GetThreadLocale
returns 407, which is the code for German. Not really surprising, but where is this value set? I searched forSetThreadLocale
but found nothing. Any other hints what might set the locale? – KinesicsGetThreadLocale
because I realized the exception string is taken from the resource-strings. so this string is already compiled into your application. So your application is already pre- configured to use locale 407. – Hectocotylus