installer-prompt/scripts/change-system-language
Simon Quigley 24a20939a6 Add a backend for the language selection menu
Assuming you're running this at root, immediately when the dropdown box has a changed value, it installs the required language packs, updates the system locale, then kicks off an SDDM reboot.

This needs lots of error handling and UX to ensure the user doesn't just hold down the down arrow and crash their computer.
2023-12-05 19:05:30 -06:00

10 lines
264 B
Bash
Executable File

#!/bin/bash
LANGUAGE_CODE=$1
COUNTRY_CODE=$2
LOCALE="${LANGUAGE_CODE}_${COUNTRY_CODE}.UTF-8"
apt-get -y install language-pack-gnome-$LANGUAGE_CODE language-pack-kde-$LANGUAGE_CODE
update-locale LANGUAGE=$LOCALE LANG=$LOCALE LC_ALL=$LOCALE
systemctl restart sddm