Solved User-only localization

Hi all,

I'm hoping to set up Polish localization on my system [actually, I just need to be able to use Polish letters in the terminal and in X], but only on a per-user basis, IE I would not like to do any system-wide localization as different users of this system use different languages.

I have read the manual pages, as well as some online guides: here and here.

They all seem pretty straight forward, but before committing myself to any changes, I would like to be sure that I will be changing the settings for MY USER ONLY.

Can I just do the part of the handbook called "24.3.4.1.1.1 User Level Setup" or do I have to edit rc.conf and /etc/login.conf as in the above guides?http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/using-localization.html
 
the ~/.login_conf file should be far enough for terminal.
I'm using this at work in ssh terminals, and it's working nice.

Since I'm french, I'm using fr_FR and UTF-8, so your file should be different :

Code:
# $FreeBSD: src/share/skel/dot.login_conf,v 1.3 2001/06/10 17:08:53 ache Exp $
#
# see login.conf(5)
#
#me:\
#       :charset=iso-8859-1:\
#       :lang=de_DE.ISO8859-1:
me:\
    :charset=UTF-8:\
    :lang=fr_FR.UTF-8:\
    :setenv=LC_COLLATE=C:
 
Thanks for the quick response.

I added
Code:
me:\
 :charset=iso-8859-2:\
 :lang=pl_PL.ISO8859-2:
to my ~/.login_conf and the result was that many of my programs switched to polish language.

I cannot however type / input any Polish characters yet. I'm guessing I should change my keymap? [Although I already chose the Polish Keymap during my install]

I have seen keymap entries in rc.conf but, again, how could I make sure that only MY user can input Polish symbols / characters?

All the guides I've seen seem to be implementing system-wide "polonization".
 
I put this
Code:
"setxkbmap -layout us,bg ,phonetic -option grp:ctrl_shift_toggle"
in kbd.phonetic.sh and execute it upon logon.
 
Thank you yom and zodias.

I can now read and input Polish letters in the terminal, before logging in! :) I've added the following code to my /etc/rc.conf
Code:
font8x14=”iso02-8x14″
 font8x16=”iso02-8x16″
 font8x8=”iso02-8x8″
 keymap=”pl_PL.ISO8859-2

I can also read and input the characters in the terminal as my user, after adding the following code to my ~/.login_conf
Code:
me:\
 :charset=iso-8859-2:\

(This, however, has broken the info bar in my window manager -spectrwm. I will try to find out why. It has also changed my apps EG vi, opera, to Polish language, which is not what I wanted)

I can also now read Polish letters in X apps [such as my browser] but I am unable to see them or input them into virtual terminals or X apps.

Perhaps it has something to do with the following details. In Vermadden's guide listed in my original post it is said to edit ttys and change "cons25" to "cons25l2" which I have not done for the following reason: My ttys contains "xterm" where "cons25" should be.

I have not changed or edited /etc/login.conf because I believe this will change the setting for all users.

So three questions remain:

Would I be right in assuming that editing /etc/login.conf will result in changes for ALL users?

Is it safe to change "xterm" to "cons25l2" in ttys?

Why are my apps now in Polish? Was it the changes to /etc/rc.conf or ~/.login_conf?
 
I have got what I wanted so I will mark this thread as solved.

In case this helps anyone else, here is what I wanted and how I did it:

1. Read / write Polish characters in the terminal
2. Read / write Polish characters in X apps
3. Keep my apps / menus in English language.

All this was meant to be FOR MY USER ONLY, not for the whole system, although I'm assuming all the users on my system are using a Polish keyboard.

So here is what I did:

1. Added the following to /etc/rc.conf
Code:
font8x14=”iso02-8x14″
 font8x16=”iso02-8x16″
 font8x8=”iso02-8x8″
 keymap=”pl_PL.ISO8859-2


2. Added the following to ~/.login_conf
Code:
me:\
 :charset=iso-8859-2:\
 :setenv=LC_ALL=en_US.ISO8859-1


##############
3. This third step is not necessary, for me at least.

In /etc/ttys I changed all instances of "cons25" [actually on my system it said "xterm"] to "cons25l2"
##############

4. To my /etc/X11/xorg.conf I added
Code:
Section “InputDevice”
    Identifier “Keyboard0″
    Driver “kbd”
    Option “XkbLayout” “pl”
 EndSection

5. In my ~/.xinitrc I added
Code:
export LC_ALL=en_US.UTF-8

And that was it! :) Please note that I haven't modified my /etc/login.conf, nor have I added anything to my ~/.Xdefaults. It was also not necessary for me to add the following to my ~/.Xdefaults:
Code:
xterm*font: -misc-fixed-medium-r-normal–15-*-*-*-*-*-iso8859-2

It may actually be that one or two of these steps are unnecessary as I did this by trial and error. Big thanks to Vermaden for the help.
 
FYI, spectrwm's status bar uses strftime(3) as part of its line parsing. Perhaps the corruption appears there. strftime() does have POSIX locale extensions which you could have a look at.
 
Back
Top