steamos_CJ_locale_enabler.sh 857 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env bash
  2. # DESCRIPTION
  3. # Applies to: SteamOS, Chinese and Japanese keyboard layout
  4. # This script enables the Chinese and Japanese locale files and regenerates them.
  5. #
  6. # NOTES
  7. # The changes done by this script might be undone by system updates.
  8. #
  9. # AUTHOR
  10. # Bluefissure (2023)
  11. sudo steamos-readonly disable
  12. sudo pacman-key --init
  13. sudo pacman-key --populate archlinux
  14. # Update glibc
  15. sudo pacman -S glibc
  16. # Enable (uncomment) the locale
  17. sudo sed -i "s%#ja_JP.UTF-8 UTF-8%ja_JP.UTF-8 UTF-8%" /etc/locale.gen
  18. sudo sed -i "s%#zh_CN.UTF-8 UTF-8%zh_CN.UTF-8 UTF-8%" /etc/locale.gen
  19. # Regenerate all enabled locale
  20. sudo locale-gen
  21. sudo steamos-readonly enable
  22. echo "Next steps:"
  23. echo "1. In Steam: use the start options 'LANG=ja_JP.UTF-8 %command%' or 'LANG=zh_CN.UTF-8 %command%'"
  24. echo "2. Restart steamOS before starting the game"