On Mon, 13 Jul 2026 21:08:58 GMT, Marius Hanl <[email protected]> wrote:
>> the application requirements might call for forcing a specific locale, even >> dynamically. > > Changing the `Locale` with `Locale.setDefault(..)` is actually quite common > if you want to support changing the `Locale` at runtime. > This is needed because everything usually uses `Locale.getDefault()` (even > JavaFX for translations), so as far as I know, there is really no way around. If I want to change the locale at runtime I use my own mutable `Locale` and pass it to the relevant methods as is supported with these converters. I didn't know changing the default was common. One reason is that if you want to reset the preferences, you can read the (system) default locale, but if you change it, what do you reset to? ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1880#discussion_r3574204245
