How to change locale in a Windows terminal?
naoto.sato at oracle.com
Wed Aug 10 04:34:18 UTC 2016
Java's default locale follows the default UI Language on Windows. So
your Windows has to have Chinese UI package installed and selected as
the default UI language. I don't have Windows 10 at hand, but Windows
used to be capable of downloading/installing UI language packs on
certain flavor of their Windows variations.
On 8/9/16 7:52 PM, Weijun Wang wrote:
> Hi Kris
> Yes, it works, with -Duser.language.
> Unfortunately, I am looking for a way to change the default/initial
> locale, and then using these system properties to change the effective
> locale again. :-)
> Precisely, there is a test using grep to match warning messages and on a
> Chinese Windows it cannot find the hardcoded English text. Since I only
> have Windows in English, I need to a way to mimic a Chinese Windows
> first, and then see if adding -Duser.language=en -Duser.country=US to
> the test will make it work again.
> On a Mac it's much easier.
> On 8/10/2016 9:33, Krystal Mok wrote:
>> Hi Max,
>> Does setting -Duser.country=CN work for you? (I don't remember what the
>> correct name for China should be, but setting that to US forces java to
>> print the help message in English)
>> - Kris
>> On Tue, Aug 9, 2016 at 6:25 PM, Weijun Wang <weijun.wang at oracle.com
>> <mailto:weijun.wang at oracle.com>> wrote:
>> My Windows 10 is English, but I want the java command to show
>> Chinese help screen temporarily.
>> I've tried "set LANG", chcp, "control intl.cpl,, /f:" but none works.
More information about the core-libs-dev