Musl: Difference between revisions

From Alpine Linux
m (fixed typo)
(added links, headings and open issues)
Line 1: Line 1:
Alpine Linux uses musl as its C standard library.
Alpine Linux uses [https://musl.libc.org/ musl] as its C standard library.


== Locale ==
== Locale ==
Line 18: Line 18:
Now custom override file can be edited with <Code>nano /etc/profile.d/locale.sh.sh</Code>.
Now custom override file can be edited with <Code>nano /etc/profile.d/locale.sh.sh</Code>.


== Language support ==  
=== Language support ===


<!--Need to identify proper page for maintaining this information, if this is not appropriate -->
<!--Need to identify proper page for maintaining this information, if this is not appropriate -->
Line 33: Line 33:
For example, to list translation packages for Portuguese(pt) language:
For example, to list translation packages for Portuguese(pt) language:
{{Cmd|apk list *-pt *-pt-*}}
{{Cmd|apk list *-pt *-pt-*}}
== Open issues==
Refer to [https://wiki.musl-libc.org/open-issues Open Issues] page of musl-libc wiki for a brief note on the list of major open issues.


== See Also ==
== See Also ==

Revision as of 10:32, 11 April 2025

Alpine Linux uses musl as its C standard library.

Locale

To Fix unicode defaults: sed -i 's/#unicode="NO"/#unicode="NO"\nunicode="YES"/' /etc/rc.conf

Musl does not implement most of the locale features that glibc implements. The musl-locales package provides translations with varying degrees of completion. The below command installs a limited set of locales (languages) for musl (C library) generated console messages.

# apk add musl-locales

The musl-locales package also provides locale command. To list defined locales:

locale -a

This package includes a file /etc/profile.d/00locale.sh. You'll need to re-login or source it manually for locales to work.

Copy the default locale settings file /etc/profile.d/20locale.sh to a custom override file:

# cp /etc/profile.d/20locale.sh /etc/profile.d/20locale.sh.sh

Now custom override file can be edited with nano /etc/profile.d/locale.sh.sh.

Language support

To pull in the translation packages for all installed packages:

# apk add lang

To list available hunspell dictionary packages, so that you relevant language dictionary can be added:

apk list hunspell*

To list translation packages for your specific(xy) language:

apk list *-xy *-xy-*

For example, to list translation packages for Portuguese(pt) language:

apk list *-pt *-pt-*

Open issues

Refer to Open Issues page of musl-libc wiki for a brief note on the list of major open issues.

See Also