[GRASS-user] Set language in Linux

Glynn Clements glynn at gclements.plus.com
Wed Jan 6 14:29:20 EST 2010


Gilbert Ferrara wrote:

> I want to set GRASS LANGUAGE in a LINUX installation. In Windows is quite
> easy, just add the following in .../etc/init.bat:
> 
> set LANGUAGE=es_ES
> 
> set LANG=es_ES
> 
> set LC_ALL=es_ES
> 
> And in LINUX, how is it done? Just add the same text in .../etc/init.sh and
> it's finished or do I have to do something to this file?

These would normally be set in e.g. ~/.profile (or ~/.bash_profile
etc; there are quite a lot of files which may be read by the shell)
then inherited by all processes.

Setting environment variables in Unix is done with e.g.:

	LANG=es_ES
	export LANG

I'd advise against using LC_ALL, as it overrides LC_NUMERIC. This can
cause numbers to use a comma as the decimal separator, which is
problematic when writing files (most file formats require a period).

GRASS modules only use the LC_MESSAGES category directly, but some
programs and (especially) scripts invoke external programs which may
be affected by the LC_NUMERIC or LC_ALL settings (scripts which use
awk are prone to this, although I think that we have now found them
all and forced LC_NUMERIC=C).

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list