Post by spannernick on Oct 13, 2021 13:28:41 GMT
I will be removing the Languages from the next version of PCUAE(PCUAE 1.7.2) so it will only have English in it and adding them to a Language Pack for you to install separately, I have done this so you can add your own languages to PCUAE and can see what files need translating, if you want to add a language then all files need translating into your language, there is no point only doing part of it and not the rest, it not a easy job to do, there are a lot of files to translate.
I will make a walk through on how to make a language and how to add it to the pack, when I have some time, in this thread.
If Davy wants to help with this, he can....
Walk Thought (***This is not completed yet***)
IT WILL TAKE ME A WHILE TO COMPLETE THIS, ITS NOT FINISHED, ITS IN BLUE CAUSE ITS NOT COMPLETED.
How to add a Language to Language Pack
===========================
This is done on a PC with Windows on it, do not know how to do it on Linux.
You will need WinRAR so download and install WinRAR, do not buy WinRAR, just download it, its free so you do not need to buy it.
Download Notepad++ and install it, you will need this to edit the scripts in the pack, click on Download on the left of the page on Notepad++ site to download the latest version.
1. Download the pack
2. Make a new folder on your PC and call it Language Pack, to copy the Language Pack files from the setup file to the folder so you can edit them, now open the Language Pack with WinRAR and copy all files to the new Language Pack folder on your PC.
3. Go into the new Language Pack folder you made and go into `Carousel_Games\Options\languages` and make a copy of the English folder in the same folder and change the copies name to the language you want to add so like `Polish`.
4. The next part will be script editing.
Click on and open with Notepad++ `Select_Languages.sh` script file, you now need to add your language to the script file otherwise you will not be able to change to it.
This is the menu script
To add you language you need to add a new line after 3 so its 4 so...
and like...
Make sure you press return after each line in the menu code, you can not have a space between them cause the menu is one continuous line with returns in it, if it has a space in it then the menu will not load.
Done that now, you need to add the selection for option 4 in the menu, look for 4) in `case $SELECTION in` below the menu code.
This part of the code...
you will see it after the 3) code a 4) with no code, you will be using that to add your language option to, now
copy this code to 4) click on after the bracket ) with your mouse pointer and the copy and paste this code in...
so it looks like...
To be continued... its a long walk thought so will take time to make and complete.
I will make a walk through on how to make a language and how to add it to the pack, when I have some time, in this thread.
If Davy wants to help with this, he can....
Walk Thought (***This is not completed yet***)
IT WILL TAKE ME A WHILE TO COMPLETE THIS, ITS NOT FINISHED, ITS IN BLUE CAUSE ITS NOT COMPLETED.
How to add a Language to Language Pack
===========================
This is done on a PC with Windows on it, do not know how to do it on Linux.
You will need WinRAR so download and install WinRAR, do not buy WinRAR, just download it, its free so you do not need to buy it.
Download Notepad++ and install it, you will need this to edit the scripts in the pack, click on Download on the left of the page on Notepad++ site to download the latest version.
1. Download the pack
2. Make a new folder on your PC and call it Language Pack, to copy the Language Pack files from the setup file to the folder so you can edit them, now open the Language Pack with WinRAR and copy all files to the new Language Pack folder on your PC.
3. Go into the new Language Pack folder you made and go into `Carousel_Games\Options\languages` and make a copy of the English folder in the same folder and change the copies name to the language you want to add so like `Polish`.
4. The next part will be script editing.
Click on and open with Notepad++ `Select_Languages.sh` script file, you now need to add your language to the script file otherwise you will not be able to change to it.
This is the menu script
--menu "Please select language:" $HEIGHT $WIDTH 9 \
"1" "English - UK/US *** " \
" " "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" \
"2" "Dutch - Netherlands " \
" " "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" \
"3" "Turkish - Turkiye - Turkey " \
" " "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" \
"0" "Go Back to the menu " \
" " "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" \
" " "*** What Language it is set on, English is set as Default. " \
" " "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" \
2>&1 1>&3)
To add you language you need to add a new line after 3 so its 4 so...
"4" "Polish - Poland " \
and like...
--menu "Please select language:" $HEIGHT $WIDTH 9 \
"1" "English - UK/US *** " \
" " "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" \
"2" "Dutch - Netherlands " \
" " "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" \
"3" "Turkish - Turkiye - Turkey " \
" " "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" \
"4" "Polish - Poland " \
" " "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" \
"0" "Go Back to the menu " \
" " "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" \
" " "*** What Language it is set on, English is set as Default. " \
" " "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" \
2>&1 1>&3)
Make sure you press return after each line in the menu code, you can not have a space between them cause the menu is one continuous line with returns in it, if it has a space in it then the menu will not load.
Done that now, you need to add the selection for option 4 in the menu, look for 4) in `case $SELECTION in` below the menu code.
This part of the code...
4 )
;;
you will see it after the 3) code a 4) with no code, you will be using that to add your language option to, now
copy this code to 4) click on after the bracket ) with your mouse pointer and the copy and paste this code in...
clear
echo " "
echo " English Selected"
echo " English Selected" >/dev/ttyS0
sleep 1
clear
echo " "
echo " "
echo " ***PCUAE In UK/US English***"
echo " By spannernick(c) Part of PCUAE"
echo " "
echo " "
echo " This will show PCUAE Option Menu/VICE Mode in English,"
echo " more languages will be added later."
echo " "
echo " This is the default language. If English is set already"
echo " nothing will happen and this will just close. It will only"
echo " reboot the machine to set the language."
echo " "
echo " "
read -n 1 -s -r -p " Press RETURN to Change To English Language..."
echo " "
sleep 1
echo " OK..."
echo " "
sleep 1
if [ ! -e /tmp/pcu/Carousel_Games/Options/languages/english_enabled ]
then
echo " Checking Language File..."
echo " "
sleep 2
echo " Loading Language File .. English..."
echo " "
sleep 1
echo " Please wait..."
echo " "
sleep 1
echo " Removing Dutch Language files..."
touch /tmp/pcu/Carousel_Games/Options/languages/english_enabled 2>/dev/ttyS0
if [ -e /tmp/pcu/Carousel_Games/Options/languages/english_enabled ]
then
echo " Created English Language File OK..." >/dev/ttyS0
else
echo " No... could not create the English Language file, trying again..." >/dev/ttyS0
sleep 1
touch /tmp/pcu/Carousel_Games/Options/languages/english_enabled 2>/dev/ttyS0
fi
if [ -e /tmp/pcu/Carousel_Games/Options/languages/english_enabled ]
then
echo " Copied Language File OK..." >/dev/ttyS0
else
echo " No... still could not copy the file, trying again one more time..." >/dev/ttyS0
sleep 1
touch /tmp/pcu/Carousel_Games/Options/languages/english_enabled 2>/dev/ttyS0
fi
if [ ! -e /tmp/pcu/Carousel_Games/Options/languages/dutch_enabled ]
then
echo " Dutch Language File removed, All OK..." >/dev/ttyS0
else
echo " No... could not remove the Dutch Language File, trying again..." >/dev/ttyS0
sleep 1
rm -f /tmp/pcu/Carousel_Games/Options/languages/dutch_enabled 2>/dev/ttyS0
fi
if [ ! -e /tmp/pcu/Carousel_Games/Options/languages/dutch_enabled 2>/dev/ttyS0 ]
then
echo " Dutch Language File Deleted, All OK..." >/dev/ttyS0
else
echo " No... still could not copy the file, trying again one more time..." >/dev/ttyS0
sleep 1
rm -f /tmp/pcu/Carousel_Games/Options/languages/dutch_enabled 2>/dev/ttyS0
fi
sleep 1
echo " All Done..."
sleep 1
echo " It should should now be set to display in English."
sleep 1
sync
echo " Rebooting in 5 seconds..."
sleep 5
reboot -f
else
echo " Checking Language File..."
echo " "
sleep 2
echo " Sorry PCUAE is already set to display in English."
sleep 5
rm -f /tmp/pcu/Carousel_Games/Options/languages/english_enabled 2>/dev/ttyS0
sleep 3
rm -f /tmp/pcu/Carousel_Games/Options/languages/dutch_enabled 2>/dev/ttyS0
sleep 2
touch /tmp/pcu/Carousel_Games/Options/languages/english_enabled 2>/dev/ttyS0
sleep 5
fi
so it looks like...
4 )clear
echo " "
echo " English Selected"
echo " English Selected" >/dev/ttyS0
sleep 1
clear
echo " "
echo " "
echo " ***PCUAE In UK/US English***"
echo " By spannernick(c) Part of PCUAE"
echo " "
echo " "
echo " This will show PCUAE Option Menu/VICE Mode in English,"
echo " more languages will be added later."
echo " "
echo " This is the default language. If English is set already"
echo " nothing will happen and this will just close. It will only"
echo " reboot the machine to set the language."
echo " "
echo " "
read -n 1 -s -r -p " Press RETURN to Change To English Language..."
echo " "
sleep 1
echo " OK..."
echo " "
sleep 1
if [ ! -e /tmp/pcu/Carousel_Games/Options/languages/english_enabled ]
then
echo " Checking Language File..."
echo " "
sleep 2
echo " Loading Language File .. English..."
echo " "
sleep 1
echo " Please wait..."
echo " "
sleep 1
echo " Removing Dutch Language files..."
touch /tmp/pcu/Carousel_Games/Options/languages/english_enabled 2>/dev/ttyS0
if [ -e /tmp/pcu/Carousel_Games/Options/languages/english_enabled ]
then
echo " Created English Language File OK..." >/dev/ttyS0
else
echo " No... could not create the English Language file, trying again..." >/dev/ttyS0
sleep 1
touch /tmp/pcu/Carousel_Games/Options/languages/english_enabled 2>/dev/ttyS0
fi
if [ -e /tmp/pcu/Carousel_Games/Options/languages/english_enabled ]
then
echo " Copied Language File OK..." >/dev/ttyS0
else
echo " No... still could not copy the file, trying again one more time..." >/dev/ttyS0
sleep 1
touch /tmp/pcu/Carousel_Games/Options/languages/english_enabled 2>/dev/ttyS0
fi
if [ ! -e /tmp/pcu/Carousel_Games/Options/languages/dutch_enabled ]
then
echo " Dutch Language File removed, All OK..." >/dev/ttyS0
else
echo " No... could not remove the Dutch Language File, trying again..." >/dev/ttyS0
sleep 1
rm -f /tmp/pcu/Carousel_Games/Options/languages/dutch_enabled 2>/dev/ttyS0
fi
if [ ! -e /tmp/pcu/Carousel_Games/Options/languages/dutch_enabled 2>/dev/ttyS0 ]
then
echo " Dutch Language File Deleted, All OK..." >/dev/ttyS0
else
echo " No... still could not copy the file, trying again one more time..." >/dev/ttyS0
sleep 1
rm -f /tmp/pcu/Carousel_Games/Options/languages/dutch_enabled 2>/dev/ttyS0
fi
sleep 1
echo " All Done..."
sleep 1
echo " It should should now be set to display in English."
sleep 1
sync
echo " Rebooting in 5 seconds..."
sleep 5
reboot -f
else
echo " Checking Language File..."
echo " "
sleep 2
echo " Sorry PCUAE is already set to display in English."
sleep 5
rm -f /tmp/pcu/Carousel_Games/Options/languages/english_enabled 2>/dev/ttyS0
sleep 3
rm -f /tmp/pcu/Carousel_Games/Options/languages/dutch_enabled 2>/dev/ttyS0
sleep 2
touch /tmp/pcu/Carousel_Games/Options/languages/english_enabled 2>/dev/ttyS0
sleep 5
fi
To be continued... its a long walk thought so will take time to make and complete.