Setting multiple locales in Slackware.
I have looked through Slackware's documentation for setting locales. It shows how to change the locale, but I did not find anything about setting up multiple locales. The ability to choose between more than one language during log-in is something I really like and would like to know if Slackware supports such a feature. Either my search skills are insufficient or this topic has not come up on the board. My previous forays into Slack were cursory, but if I cannot overcome a couple minor issues with the latest Debian, I would give Slackware a serious test. The ability (or lack thereof) to have multiple locales is the kind of thing I would like to know in advance.
|
I don't really understand what you mean when you say "during log-in". How do you log in? Runlevel 3 or 4?
I always start in runlevel 3. In the console, it all comes down to changing the $LANG variable to your desired locale. It's possible to create a script which asks you the locale you want and set the $LANG accordingly, then run it immediately after you log in. There's lots of information about localization in SDP. |
Quote:
Quote:
Quote:
|
Quote:
On this page from Debian's documentation I read: Quote:
|
I currently use GDM with my Debian system. Works beautifully. I assume it is a Gnome feature. If I remember correctly, it was the same with Ubuntu, but that was a while ago, so my memory is more than a bit fuzzy.
KDM? I have never used it. I usually avoid anything KDE, because of the ridiculous amount of bloat. Although I can now re-consider that stance with my new powerful computer.:D |
It works.
I just did that:
(1) Go to http://www.slackbuilds.org/ to download what is needed to build libgnomecanvas and gdm. (2) Build and install libgnomecanvas (3) Build and install gdm (4) (as root) "telinit 4" to change the run level (5) in GDM greetings screen, choose locale Spanish (Costa Rica) I am now under XFCE (but of course you can choose another DE or WM in gdm). The UI is in Spanish and LANG is set to es_CR.utf8 Please note that I did zero configuration in Slackware to get there, which shows that it is well designed ;) |
@Didier Spaier: Thanks for that! Yep, this allows me to flick between English and Norwegian for login with Xfce, though it does not work for KDE (and yes I have kde-l10n-en_GB-4.8.5-noarch-1 and kde-l10n-nb-4.8.5-noarch-1 installed).
I also notice that locale under Xfce, everything is flipped to nb_NO.UTF-8, where as it remains en_GB.UTF-8 (my default) for KDE. |
Quote:
|
Quote:
|
Hmm .. still some weirdness. If I start konsole my locale is set to en_GB.UTF-8 (as defined in my ~/.profile) initially but if I open an new window or tab it is nb_NO.UTF-8 (as defined by GDM).
|
And if you start an xterm? or remove the setting from your ~.profile?
|
An xterm gives me: nb_NO.UTF-8
editing out of the ~/.profile causes the first konsole to become: en_US (as defined in /etc/profile.d/lang.sh) |
could you have some leftovers in ~/.bash_profile or ~/.bashrc ?
|
@ponce: they are both blank.
Actually I have just realised that the only the first tab has settings taken from /etc/profile (and /etc/profile.d/). For example the first tab has the color aliases /etc/profile.d/coreutils-dircolors.sh but subsequent tabs and or konsole windows do not. I suspect this has always been the case and I haven't noticed it because I don't generally use multiple tabs konsole, rather I fire up one and then start tmux. It seems like all extra konsole tabs and windows are not having all the variables set. |
Ok, I see what konsole seems to be doing. It treats the first tab as a login shell but not the others. Hmm ... weird. I guess that makes sense in some way.
|
All times are GMT -5. The time now is 10:56 AM. |