language selection in pmbootstrap
Languages are different in musl-libc based Alpine than in your typical glibc based distro:
- locales are not generated via
locale-gen
. instead, there is amusl-locales
package, which makes these locales available. Just install the package, no need to build them afterwards. - set a language with e.g.
export LANG=de_DE.UTF-8
. There is no localectl or similar (as provided by systemd). Instead, we could put that line in an /etc/profile.d script. - install
lang
to pull in all language subpackages of installed packages (install_if)
With that in mind, we could provide language selection in pmbootstrap as follows:
- ask in "pmbootstrap init" about the language of the to-be-installed postmarketOS
- there aren't many languages now, so we can just hardcode them in
pmb/config/__init__.py
- there aren't many languages now, so we can just hardcode them in
- if it is not english:
- install "lang"
- write /etc/profile script to select the language