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.