Set language
Page 1 of 1 • Share •
Set language
If you look at /etc/profile.d/lang.sh in your favorite text editor you will see a section that looks like this:
# en_US is the Slackware default locale:
export LANG=en_US
If I wanted my system in Canadian French I could change this section as follows:
# en_US is the Slackware default locale:
export LANG=fr_CA
export LANGUAGE=fr_CA
export LINGUAS=fr_CA
export LC_ALL=fr_CA
You could optionally add .utf8 for Unicode support to each line. Some old applications don't handle Unicode properly. On the other hand, if you use a language that has non-Latin glyphs Unicode is pretty much mandatory. Some Slackware derivatives now use Unicode as part of their default setting even in English. If I'm setting up a system to work in Israeli Hebrew this section would read:
# en_US is the Slackware default locale:
export LANG=he_IL.utf8
export LANGUAGE=he_IL.utf8
export LINGUAS=he_IL.utf8
export LC_ALL=he_IL.utf8
If you're not sure what the language and locale codes are the command:
locale -av
will give you a detailed alphabetical list. It's a very long listing so you may want to pipe the output to more or redirect it to a file.
lang.csh is similar with the setenv command replacing the export command. A stock Slackware lang.csh file will have code that looks like:
# en_US is the Slackware default locale:
setenv LANG en_US
As in lang.sh you replace en_US with the language and locale you want and you include all four variables. Brazilian Portuguese with Unicode support looks like this:
# en_US is the Slackware default locale:
setenv LANG pt_BR.utf8
setenv LANGUAGE pt_BR.utf8
setenv LINGUAS pt_BR.utf8
setenv LC_ALL pt_BR.utf8
By Caitlin Martin 2009
# en_US is the Slackware default locale:
export LANG=en_US
If I wanted my system in Canadian French I could change this section as follows:
# en_US is the Slackware default locale:
export LANG=fr_CA
export LANGUAGE=fr_CA
export LINGUAS=fr_CA
export LC_ALL=fr_CA
You could optionally add .utf8 for Unicode support to each line. Some old applications don't handle Unicode properly. On the other hand, if you use a language that has non-Latin glyphs Unicode is pretty much mandatory. Some Slackware derivatives now use Unicode as part of their default setting even in English. If I'm setting up a system to work in Israeli Hebrew this section would read:
# en_US is the Slackware default locale:
export LANG=he_IL.utf8
export LANGUAGE=he_IL.utf8
export LINGUAS=he_IL.utf8
export LC_ALL=he_IL.utf8
If you're not sure what the language and locale codes are the command:
locale -av
will give you a detailed alphabetical list. It's a very long listing so you may want to pipe the output to more or redirect it to a file.
lang.csh is similar with the setenv command replacing the export command. A stock Slackware lang.csh file will have code that looks like:
# en_US is the Slackware default locale:
setenv LANG en_US
As in lang.sh you replace en_US with the language and locale you want and you include all four variables. Brazilian Portuguese with Unicode support looks like this:
# en_US is the Slackware default locale:
setenv LANG pt_BR.utf8
setenv LANGUAGE pt_BR.utf8
setenv LINGUAS pt_BR.utf8
setenv LC_ALL pt_BR.utf8
By Caitlin Martin 2009
Last edited by johnnyhoodoo on Mon Nov 01, 2010 6:39 pm; edited 1 time in total (Reason for editing : Add author credit.Cant believe I missed it out.)
Similar topics» Why is this in a different language? (Must Read)
» Metadata in Wrong Language
» Imported to iTunes with different language
» 03) Halliday presents: The Functions of Language
» Set language
» Metadata in Wrong Language
» Imported to iTunes with different language
» 03) Halliday presents: The Functions of Language
» Set language
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum