Is there an alternative to C# Thread.CurrentThread.CurrentCulture in Java? If not what is the best place to store user selected locale in Java?
Is there an alternative to C# Thread.CurrentThread.CurrentCulture in Java? If not what is the
Share
Locale.setDefault() sets the default locale for the whole JVM, which is fine for a client application. For a web application, it’s not a valid solution, but a thread-local is not either, since the same threads are used for all the users. In this case, the user locale is typically stored in the HTTP session.