You are not logged in.
I have uncommented "zh_CN.UTF-8" in /etc/locale.gen, re-generated the locale using locale-gen, and changed $LANG into zh_CN.UTF-8 in /etc/locale.conf. But when I restart WSL, the language has turned back to en_US.UTF-8. Running "unset LANG" and "source /etc/profile.d/locale.sh" cannot preserve the locale either. What should I do? Thanks!
Offline
For clarity :
You did follow https://wiki.archlinux.org/title/Instal … nux_on_WSL ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Online
It seems not to be related to my issue
Last edited by xuangeyouneihan (2025-08-20 05:59:36)
Offline
The only info about support for the wsl images is in thread on arch-dev-public ML .
It mentions bugs can be submitted at https://gitlab.archlinux.org/archlinux/ … l/-/issues and some devs are willing to help with such bugs.
There is an indicated the community should get involved but it's unclear what community the thread refers to.
The thread also mentions that supporting WSL requires having access to a windows system configured to run WSL..
A large part of forum users doesn't have such access.
Moderators haven't decided yet whether we will try to support WSL on the forum, but IF we do we need detailed info about your setup.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Online
wsl --install archlinux
---
pacman-key --init
pacman-key --populate
pacman -Sy vim
---
Then I just did the steps I mentioned in the first post, and encountered the problem
Last edited by xuangeyouneihan (2025-08-20 05:42:19)
Offline
What language is the windows environment from which you're using WSL?
WSL attempts to set your LANG to the same as windows, so that could be overriding whatever you're using.
to override this, there are two simple options:
1. run `ln -sf /etc/locale.conf /etc/default/locale`. this will ovverride the locale that WSL tries to set on top of the distro, to the one you've set.
2. set your LANG in your .bashrc/.zshrc
otherwise WSL will try to make WSL match Windows.
Edit: I added this to the wiki:
https://wiki.archlinux.org/title/Instal … ust_locale
Last edited by mhegreberg (2025-08-20 15:51:58)
I maintain the Archlinux WSL image, as well as a few AUR packages. Find me on IRC as m_a_r_k
Offline
Both my language of the Windows environment and the language I try to set for WSL are simplified Chinese. I'm not convenient to access the computer right now, but I'll give the methods you mentioned a try when I'm free. Thank you!
Last edited by xuangeyouneihan (2025-08-20 16:29:44)
Offline
What language is the windows environment from which you're using WSL?
WSL attempts to set your LANG to the same as windows, so that could be overriding whatever you're using.
to override this, there are two simple options:
1. run `ln -sf /etc/locale.conf /etc/default/locale`. this will ovverride the locale that WSL tries to set on top of the distro, to the one you've set.
2. set your LANG in your .bashrc/.zshrcotherwise WSL will try to make WSL match Windows.
Edit: I added this to the wiki:
https://wiki.archlinux.org/title/Instal … ust_locale
Well, this method works, but somehow /etc/default/locale does not exist initially. Is this a problem of WSL rather than this WSL distribution?
Last edited by xuangeyouneihan (2025-08-23 06:59:19)
Offline
Archlinux uses /etc/locale.conf (default for systemd ) for systemwide locale settings,not /etc/default/locale .
https://github.com/Microsoft/WSL/issues/13207 indicates /etc/default/locale is/was used on debian to manage systemwide locale settings .
This makes it a WSL problem.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Online
OK, thanks a lot! What a stupid design!
Last edited by xuangeyouneihan (2025-08-24 02:09:27)
Offline