I use this method
LocaleContextHolder.getLocale()
to get switched locale (Japanise) but it returns me English (default). How can I retrieve the jp_JP locale?
//Return the Locale associated with the current thread,
// if any, or the system default Locale else(English)
LocaleContextHolder.getLocale();
so first you have to check Locale of your current thread. If you want to set Locale in current thread then use this code :
setLocale(Locale locale); LocaleContextHolder.getLocale() will return jp_JP locale
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With