Vstest: How to change display language to english?

Created on 17 May 2017  ·  17Comments  ·  Source: microsoft/vstest

I once used Win10&VS2017 in chinese, so I got display language in CMD was chinese, it looked like:

Microsoft (R) 测试执行命令行工具版本 15.0.0.0 版权所有 (C) Microsoft
Corporation。保留所有权利。

正在启动测试执行,请稍候...
ConsoleApp.Sqlite.Test.PrimeServiceIsPrimeShould.ReturnFalseGivenValueOf1
个失败 错误消息: Unable to get default constructor for class
ConsoleApp.Sqlite.Test.PrimeServiceIsPrimeShould.

总测试: 1。已通过: 0。失败: 1。已跳过: 0。 测试运行失败。 测试执行时间: 0.5729 秒

Then I changed my Win10's & VS2017's language to english, everything was fine (display in english) except the VSTest tools, it still displayed in chinese.

So my question is, how chould I change the language of VSTest tools to english?

Cache related? or language package of .Net Framework?

bug cli

Most helpful comment

There are no plans to add a switch to output in English

It would be so much easier than actually trying to fix encoding issues

default

All 17 comments

@Just1n : Are you using dotnet.exe or vstest.console.exe from command line to run the test?
If the answer is dotnet.exe then can you check the output of command dotnet.exe -h. Is the output is coming in English?

@Faizan2304 I'm using dotnet.exe, command is dotnet test.
dotnet -h results in english.
But dotnet test results in chinese.

PS. test result is chinese, but build output is english, see entire output:

PS D:\VS2017\Test\ConsoleApp.Sqlite.Test> dotnet test
Build started, please wait...
Build completed.

Test run for D:\VS2017\Test\ConsoleApp.Sqlite.Test\bin\Debug\netcoreapp1.1\ConsoleApp.Sqlite.Test.dll(.NETCoreApp,Version=v1.1)
Microsoft (R) 测试执行命令行工具版本 15.0.0.0
版权所有 (C) Microsoft Corporation。保留所有权利。

正在启动测试执行,请稍候...
ConsoleApp.Sqlite.Test.PrimeServiceIsPrimeShould.ReturnFalseGivenValueOf1 个失败
错误消息:
Unable to get default constructor for class ConsoleApp.Sqlite.Test.PrimeServiceIsPrimeShould.

总测试: 1。已通过: 0。失败: 1。已跳过: 0。
测试运行失败。
测试执行时间: 0.5889 秒

Thanks @Just1n.. I am looking into it and will update you soon.

Hi @Faizan2304 ,sorry for pushing.
Any updates for this?

@Just1n: I am working on it. I tried to create a local repro but no luck. I was doing with Japanese language.
Meanwhile I am in touch with .NET core team regarding this issue. I will update you once I will have something.

@Just1n : If you are block on this then you can use below workaround to get string in English
1) Go to location where dotnet is installed
2) Go to "dotnet-install-directory\sdk\sdk-version\"
3) Delete folder "zh-Hans" and "zh-Hant"

@Faizan2304 can you create a tracking issue for this in dotnet-cli?

I had the same problem with portuguese output. I tried @Just1n and @Faizan2304 solution deleting the folder /usr/share/dotnet/sdk/2.0.0/pt-BR, but it continues to output in portuguese!

@Just1n with the latest dotnet, this should be fixed. Are we still hitting this issue ?

Fixed in what way? I'm pretty sure we use most recent VS and net-framework update, but we still get messages in native language.

Is there any new commandline switch for changing language to english or something like that? If so, please tell us the details!

On the other hand, if you have just unified/corrected the os-language-detection, and the dotnet and dotnet-build and dotnet-test now speak the samel language as OS, then than this is not enough. We often use OSes with language chosen for native users (application testers), but then most people from the dev team are not native-speakers. It's still latin alphabet, not as impeding as seeing chinese or arabic glyphs, but still seeing all the test output spam in native language isn't really helping them in any way.

@quetzalcoatl The output of dotnet test will be similar to dotnet build with respect to the language. There are no plans to add a switch to output in English.

Therefore, if there's an issue of having it similar or unified, and if dotnet/build doesn't have it either, then instead of closing, you should rather move that issue (as 'enhancement' etc) to outer whole dotnet/build suite as opposed to having it limited to vstest..

There are no plans to add a switch to output in English

It would be so much easier than actually trying to fix encoding issues

default

CLI supports this from environment variable set DOTNET_CLI_UI_LANGUAGE=en. It will also respect VSLANG=<LCID>. If either override is in place, it will export both forms down to child processes, so vstest could respect that.

@mayankbansal018 Can you take a look into this?

The issue will be fixed, once we update test sdk in dotnet, which will be part of our next insertion

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jnm2 picture jnm2  ·  5Comments

MoiMoiDG picture MoiMoiDG  ·  5Comments

codito picture codito  ·  3Comments

TheRealPiotrP picture TheRealPiotrP  ·  3Comments

NotMyself picture NotMyself  ·  5Comments