The names of the languages are in 1st line of translation file.
Example for Russian:
Code: Select all
s#English#pу
Code: Select all
s#English#pу
Code: Select all
cd $DIR
i=0; for x in *; do i=$(($i+1)) && echo "( $i ) $x"; done
read -t 10 x
echo * |awk '{print $'${x:-$defaultvalue}'}'
Sorry, I have no idea what you wanted to tell meamigo wrote:They should remain separate -I have a 'de' keyboard but use English and I imagine there are others that do similar.
This was meant to be just a little demonstration of using a multi-byte char in busybox successfullyIn his blog BarryK wrote:However, 'echo' strings would probably have to stay as ascii only, as I have not yet configured Busybox as multi-byte aware (I did experiment with that awhile back but rolled back).
I will be able to use them as replacements for ls and pausetechnosaurus wrote:also you can use read -t <seconds>
but here is are a couple little chunks
Code: Select all
cd $DIR i=0; for x in *; do i=$(($i+1)) && echo "( $i ) $x"; done read -t 10 x echo * |awk '{print $'${x:-$defaultvalue}'}'
Thank you very much rodin.s,rodin.s wrote:I have made Russian translation. But it works only for three top lines. Some other file (/etc/rc.d/rc.sysinit) has to be translated for the rest.
But it's good that Russian font in console is loaded in initrd and all Russian messages in console displayed well. My unicode pet is not needed.
Edit: gettext doesn't work in /etc/rc.d/rc.sysinit.
Code: Select all
#Ру
Thanks, I have updated my copy. Will be in next upload.rodin.s wrote:I have found one small mistake in my translation (variable _M_8 was _M_7). init.gz is re-uploaded.
The strange thing was intendedrodin.s wrote:There is one strange but positive thing. When I boot pfix=ram and choose ru in initrd I got quicksetup in Russian while locale is set to en.
Code: Select all
LANGUAGE=de quicksetup
Code: Select all
# [ `grep -E '^LANGUAGE=' /etc/rc.d/PUPSTATE` ] && ( mv /etc/rc.d/PUPSTATE P; sed 's/^LANGUAGE=/\#LANGUAGE=/' P > /etc/rc.d/PUPSTATE; rm P )
It did not work with me.rodin.s wrote:...
Edit: gettext doesn't work in /etc/rc.d/rc.sysinit.
Edit2: No. I was wrong. Gettext works in /etc/rc.d/rc.sysinit. ...
Note: The variable LANGUAGE is ignored if the locale is set to ‘C’. In other words, you have to first enable localization, by setting LANG (or LC_ALL) to a value other than ‘C’, before you can use a language priority list through the LANGUAGE variable.
Code: Select all
LANG=$(cat /etc/profile | grep '^LANG=' | cut -d '=' -f2 )
Code: Select all
# cat /etc/profile | grep '^LANG=' | cut -d '=' -f2
ru_UA.UTF-8