Musl has intentionally minimal locale support compared to glibc. By design, musl only fully supports the C and C.UTF-8 locales. This means:
No translated program messages (LC_MESSAGES)
No locale-specific sorting/collation (LC_COLLATE uses byte order only)
No locale-specific formatting for monetary, numeric, time, or date values
UTF-8 character encoding is supported for input/output
For most users, setting the locale to C.UTF-8 is sufficient:
cat > /etc/profile << "EOF"
# Begin /etc/profile
export LANG=C.UTF-8
export LC_COLLATE=C
export LC_MESSAGES=C.UTF-8
#export LANG=<ll>_<CC>.<charmap><@modifiers>
# End /etc/profile
EOF
The Adelie Linux project maintains an extended locale implementation for musl that provides additional locale support. This requires CMake (available in BLFS) to build. For more information, see: https://git.adelielinux.org/adelie/musl-locales/-/tree/main
If you need full locale support including translated messages and locale-specific formatting, you may need to consider using glibc-based distributions instead.
Various packages have installed message translations in /usr/share/locale/. Setting LANG or LC_MESSAGES to a
locale like en_US.UTF-8 will enable
translated program messages where available. However, musl's locale
support is minimal - locale-specific sorting, number formatting, and
date/time formatting are not supported.
For most users, C.UTF-8 provides UTF-8
support with predictable C locale behavior:
export LANG=C.UTF-8