WSL icon indicating copy to clipboard operation
WSL copied to clipboard

wsl.exe Wrong Default Display Langauge

Open mdragosv opened this issue 4 years ago • 29 comments

Version

Microsoft Windows [Version 10.0.22621.900]

WSL Version

  • [ ] WSL 2
  • [ ] WSL 1

Kernel Version

No response

Distro Version

No response

Other Software

No response

Repro Steps

Install Windows 11 with the romanian language pack, maybe other languages affected. Run wsl --install Do wsl --help the help language wont be in english as expected

image

Expected Behavior

Default to english

Actual Behavior

PS C:\Users\marin> wsl -v Verze WSL: 1.0.0.0 Verze jádra: 5.15.74.2 Verze WSLg: 1.0.47 Verze MSRDC: 1.2.3575 Verze Direct3D: 1.606.4 Verze DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp verze Windows: 10.0.22621.900 PS C:\Users\marin> image

Diagnostic Logs

No response

Solution

https://github.com/microsoft/WSL/issues/9242#issuecomment-1406138325

mdragosv avatar Dec 01 '22 12:12 mdragosv

Could you try powershell Get-WinSystemLocale?

benhillis avatar Dec 02 '22 20:12 benhillis

Could you try powershell Get-WinSystemLocale?

LCID Name DisplayName


1048 ro-RO Romanian (Romania) image

mdragosv avatar Dec 03 '22 19:12 mdragosv

I have a similar problem, although it goes to Dutch. My display language is English:

LCID             Name             DisplayName
----             ----             -----------
1033             en-US            English (United States)

I don't even have Dutch installed.

E: Managed to fix it. In Windows settings, change the "Apps & Websites" language to English (United States).

Nuklon avatar Dec 17 '22 09:12 Nuklon

Had a similar issue, where WSL display language was in Czech.

In language settings: Windows display language: English (United States) Under Preferred languages: Only Estonian (language pack not even downloaded), which also set Apps & websites language to Estonian.

Solution: Installed English (United States) language pack under Preferred languages. Left the order remain (Estonian first, English second), so the Apps & websites language remained Estonian, but WSL diaplay language turned to English (as desired).

Hope it is helpful for others dealing with similar issue.

Sedemicra avatar Jan 27 '23 07:01 Sedemicra

Same issue here, only the system locale is en-US. However, I do have the country and region set to Romania and the default input method set as Romanian (Programmers). image

dorinlazar avatar Feb 16 '23 16:02 dorinlazar

Had a similar issue, where WSL display language was in Czech.

In language settings: Windows display language: English (United States) Under Preferred languages: Only Estonian (language pack not even downloaded), which also set Apps & websites language to Estonian.

Solution: Installed English (United States) language pack under Preferred languages. Left the order remain (Estonian first, English second), so the Apps & websites language remained Estonian, but WSL diaplay language turned to English (as desired).

Hope it is helpful for others dealing with similar issue.

Can confirm your solution works!

image

mdragosv avatar Feb 17 '23 17:02 mdragosv

Still, it's a problem that should be clarified - is the Romanian language package filled with Czech localization strings, or is there a bug in wsl?

dorinlazar avatar Feb 17 '23 20:02 dorinlazar

@dorinlazar In my case there was nothing to do with Romanian language. I myself suspect WSL, but being not familiar in detail, how languages and locales work, can't really confirm my suspicions.

Sedemicra avatar Feb 18 '23 13:02 Sedemicra

Bug in WSL

mdragosv avatar Feb 19 '23 17:02 mdragosv

I have the same issue, locale is Slovenian, until a few days ago WSL was in English, then from today on it is in Czech language. Although this happened to me already about a year ago but then fixed itself.

jurecotic avatar Mar 01 '23 15:03 jurecotic

My solution only downloads and install English (US) language packs.

futag avatar Sep 19 '23 13:09 futag

My Windows is set to English and there is no language pack installed:

  • The CLI output for commands is in English
  • The clie output for the update command is in German which leads me to believe it uses some sort of GEO IP or the region settings? Either way, pretty weird, would love to have everything in English.

Stanzilla avatar Sep 29 '23 22:09 Stanzilla

It's been almost a year and it's still broken. @benhillis Can we expect a solution anytime soon?

gril002 avatar Oct 11 '23 12:10 gril002

Same problem here since the upgrade from WSL 1.2.5.0 to 2.0.7.0

My Windows 11 is setup to use English for the Language and French for the Region.

PS> systeminfo | findstr Locale
System Locale:             en-gb;English (United Kingdom)
Input Locale:              en-gb;English (United Kingdom)

PS> Get-WinSystemLocale

LCID             Name             DisplayName
----             ----             -----------
2057             en-GB            English (United Kingdom)

PS> xyz
xyz : The term 'xyz' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.

It looks like that sometime WSL.EXE uses the Region, and sometime it uses the Language.

For some options WLS.EXE displays result in French (my Windows Region):

PS> wsl.exe --version
Version WSL : 2.0.7.0
Version du noyau : 5.15.133.1-1
Version WSLg : 1.0.59
Version MSRDC : 1.2.4677
Version direct3D : 1.611.1-81528511
Version de DXCore : 10.0.25880.1000-230602-1350.main
Version de Windows : 10.0.22621.2428

For other options it displays result in English (my Windows Language):

PS> wsl -l -v
  NAME                      STATE           VERSION
* Alpine                    Running         2
  docker-desktop            Stopped         2
  docker-desktop-data       Stopped         2
  OracleLinux_7_9           Stopped         2
  podman-machine-default    Stopped         2

And sometime it is a mix of French and English

PS> wsl --import my_distro .\dir\ alpine.tar.gz
Importation en cours. Cette opération peut prendre quelques minutes.
The operation completed successfully.

NOTES: the solution from Sedemicra doesn't work for me.

Here my Windows setup that was working before the upgrade from WSL 1.2.5.0 to 2.0.7.0

Language-Region

But this is not the real problem

WSL is not a tool for general public, it is only used by developers. I believe that every developer expects an output in English, regardless of language and region. If the output is depending on the Windows configuration how can I grep the WSL output?

Example: This bash statement works only in English but not in French, Spanish, Greek, Japanese etc... name=$( wsl.exe --list --all | tr -d '\r\0' | grep '(Default)' | cut '-d ' -f1 )

English:

wsl --list --all Windows Subsystem for Linux Distributions: OracleLinux_9_1 (Default)

French:

wsl --list --all Distributions du Sous-système Windows pour Linux : OracleLinux_9_1 (par défaut)

Regards

JEAYNE avatar Oct 31 '23 14:10 JEAYNE

This just suddenbly happend for me today: image image

AndreasBrostrom avatar Nov 21 '23 17:11 AndreasBrostrom

Single command - two languages.

image

It's a widespread problem across Microsoft products where Culture and UI Culture are mixed.

Region/Regional format/Location should never affect the language. Either Windows display language or the first one on preferred language list should be used (these are both en-US for me).

dstarkowski avatar Nov 24 '23 11:11 dstarkowski

Why on earth is my WSL German? I installed Windows in English (United States). @benhillis, you commented over a year ago without any follow-up. Please, look at it.

grafik

grafik

danielniccoli avatar Jan 07 '24 10:01 danielniccoli

I have the same problem right after doing the wsl --update from 1.x.x.x to 2.0.14.0. WSL output language has changed to Russian. image

Should've been English - the chosen Windows display language and the topmost preferred language: image

Mentioned solutions don't work. Chosen regional date/time format should NOT affect the WSL output language.

iburakov avatar Jan 07 '24 20:01 iburakov

After some experimentation, it is clear that the language WSL uses for localization is taken from the "reginal format" setting, as several people have pointed out above, which is 100% a bug. People can and do use other contries formats without knowing the language, and not being able to even read the help without changing system settings to something inconvenient is awful. Please fix.

romasandu-gaijin avatar Jan 18 '24 14:01 romasandu-gaijin

I don't think it is taken from regional. mdragosv has regional set to Romanian and his wsl was in Czech. Same for me, regional set to Slovenian, wsl in Czech...

jurecotic avatar Jan 18 '24 14:01 jurecotic