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.
10 lines
264 B
Bash
Executable File
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
|