Good evening fellow slacker,
Recently I have been working with Slackware localization for Lithuanian language. So I can share what I've learned and hopefully this will be more or less useful to you.
First, if you are doing localization stuff, there is good chance that you want to use UTF-8 locales, if you do, then you need 4 things:
1. append=" vt.default_utf8=1" line in lilo.conf file
2. edit /etc/profile.d/lang.sh and /etc/profile.d/lang.csh files to set system-wide locale
3. install good Unicode font, like terminus-font from SBo
4. edit your ~/.bashrc and/or ~/.bash_profile files to enable font and source /etc/profile
Usually there are two scenarios with localization:
1. Localize whole system. (set bg_BG system-wide)
2. Per user localization (leave en_US system-wide, set bg_BG for you)
Now this is what I do for system-wide localization:
1. Edit /etc/lilo.conf and add utf-8 append if it isn't there:
Code:
# Append any additional kernel parameters:
append=" vt.default_utf8=1"
boot = /dev/sda
compact
Then issue lilo command to update boot loader. If you needed to do this step, then you will need to reboot after all below steps are done.
2. Edit /etc/profile.d/lang.sh and /etc/profile.d/lang.csh to set needed locale:
Code:
#/etc/profile.d/lang.sh
#export LANG=en_US.ISO8859-1
export LANG=lt_LT.UTF-8
and:
Code:
#/etc/profile.d/lang.sh
#export LANG=en_US.ISO8859-1
export LANG=lt_LT.UTF-8
3. Install
Terminus-font from slackbuilds.org
4. Edit ~/.bash_profile
Code:
#~/.bash_profile
# Source global definitions
if [ -f /etc/profile ]; then
. /etc/profile
fi
# Set Terminus font
if [ $TERM = "linux" ]; then
setfont ter-v16n
fi
Then edit ~/.bashrc and add:
Code:
# Source global definitions
if [ -f /etc/profile ]; then
. /etc/profile
fi
# Set Terminus font
if [ $TERM = "linux" ]; then
setfont ter-v16n
fi
Thats it. After this I have Slackware speaking Lithuanian in command line and in GUI system-wide. However, I hear it's advised (not sure why) to leave system-wide setting to non-Unicode en_US locale and only enable Unicode locales for users who needs them. In this scenario I do similar steps, but slightly different. First 3 steps are identical, you just need to leave lang.sh and lang.csh set to en_US or en_US.UTF-8 and then edit your ~/.bashrc and/or ~/.bash_profile files to set user locale:
Code:
#~/.bash_profile
# Source global definitions
if [ -f /etc/profile ]; then
. /etc/profile
fi
export LANG=lt_LT.UTF-8
if echo $LANG | grep -iq UTF ; then
export G_FILENAME_ENCODING="@locale"
fi
# Set Terminus font
if [ $TERM = "linux" ]; then
setfont ter-v16n
fi
and:
Code:
#~/.bashrc
# Source global definitions
if [ -f ~/.bash_profile ]; then
. ~/.bash_profile
fi
Hope this helps. But do keep in mind that this is just how I do it and I am not 100% sure on .bash part (maybe someone can explain more clearly), but both scenarios works well for me so far.