You are not logged in.

#1 2009-12-18 13:41:21

Tekrotzen
Member
From: Barcelona
Registered: 2009-11-26
Posts: 20

[solved]Multilingual System: display managers and locale export...

I'm trying to find a good way to setup my laptop to allow people to choose a language at boot.
Problem is I don't find a single DM without too much dependencies that let the user change the locale...

I've been thinking that maybe the best option would be to create a user for each language and to export locale using .xininitrc, but what would be the best way to share the home folder for all those users, then?

Even if only one person would be logged at a time, I still need a different .xinitrc for each user, or a script in there to export locale according to the name... But no idea how to write that.

Is there a nice and clean way to do it?

Thanks!

Edit: looks like there's maybe a way to use the session variables of Slim with a case statement in .xinitrc...
Could be perfect!

Last edited by Tekrotzen (2009-12-18 14:28:15)

Offline

#2 2009-12-18 14:27:46

Tekrotzen
Member
From: Barcelona
Registered: 2009-11-26
Posts: 20

Re: [solved]Multilingual System: display managers and locale export...

Ok, so that was way more easy than expected.

So, basically:

In /etc/slim.conf
sessions            Spanish,English,French

At the beginning of the .xinitrc:

DEFAULT_SESSION="es_ES.UTF-8"

case $1 in
Spanish)
        export LANG="es_ES.UTF-8"
        ;;
English)
        export LANG="en_US.UTF-8"
        ;;
French)
        export LANG="fr_FR.UTF-8"
        ;;
*)
        export LANG=$DEFAULT_SESSION
        ;;
esac

And I can change the language...
Nice.

Last edited by Tekrotzen (2009-12-18 21:45:36)

Offline

Board footer

Powered by FluxBB