Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Aug 2007 17:34:57 +0000 (UTC)
From:      Marcin Wisnicki <mwisnicki+freebsd@gmail.com>
To:        freebsd-gnome@freebsd.org
Subject:   Re: Gdm and user localization
Message-ID:  <fb9jg1$dus$1@sea.gmane.org>
References:  <46D7073A.4000605@fastmail.fm> <1188500173.51256.31.camel@shumai.marcuscom.com> <1af6a62f0708301203n3708aa59g30b99143cb64ed97@mail.gmail.com> <1188503195.51256.38.camel@shumai.marcuscom.com> <46D7BD0B.8010009@fastmail.fm> <1188544237.51256.94.camel@shumai.marcuscom.com> <fb961r$orm$1@sea.gmane.org> <46D83CB0.9020708@fastmail.fm> <fb9g7e$orm$2@sea.gmane.org> <46D84E28.2060704@fastmail.fm>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 31 Aug 2007 19:21:44 +0200, Alberto Rizzi wrote:

> Marcin Wisnicki ha scritto:
>> On Fri, 31 Aug 2007 18:07:12 +0200, Alberto Rizzi wrote:
>>>> another way is to create file /etc/sysconfig/language with:
>>>>
>>>> echo it_IT.UTF-8
>>>>
>>> This doesn't work and I didn't find any documentation about it in the
>>> FreeBSD world, but only under Suse and other linux distro
>>>
>>>
>> Look into /usr/local/sbin/gdm, it's a shell script.
>> 
>> It sources /etc/profile and then if LANG is still unset it will
>> evaluate /etc/sysconfig/languages as value of LANG.
>> 
>> Both ways work for me.
>> 
> I did a mistake. I put LANG=it_IT.ISO8859-15 instead of it_IT.ISO8859-15
> in language file but it still doesn't work
> 
> #cat /etc/sysconfig/language
> it_IT.ISO8859-15

that should be:

echo it_IT.ISO8859-15

> 
> #ls -l /etc/sysconfig/language
> -rw-r--r--  1 root  wheel  17 31 Aug 19:07 /etc/sysconfig/language
> 
> I'm trying to debug the script but I don't know nothing about sh script
> What does this mean?
>      LANG=`. /etc/sysconfig/language; echo $RC_LANG`

". /etc/sysconfig/language" sources that file (includes its content in 
place of dot)

Commands contained within backticks "`" are executed and replaced with 
their output.

So in this case it will execute contents of /etc/sysconfig/language 
(hence the need of "echo") then execute "echo $RC_LANG".

Output of this will be assigned to variable LANG.

So from the look of it there is also a third option to localize gdm by 
setting RC_LANG in /etc/profile.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fb9jg1$dus$1>