[rrd-users] Re: Hack for graphics localization and correction

Thierry Nkaoua tnka at linux-sottises.net
Tue Apr 9 08:23:30 MEST 2002


Tobias Oetiker a dit:
>
> Today Thierry Nkaoua wrote:
>
>>
>> Javier Chirino a dit:
>> > hi
>> > I want to change the language the my graphics to spanish
>> > I made the changes in the /src/rrd_graph.c,
>> > in the graphics the words week change by "semana",  but the language
>> > for this day and mounth still in english.
>> >
>> > I need change something else ?
>>
>> Hi
>>
>> I posted a complement to my first post... have a look in your mailbox
>> or in the archive
>> replace
>> setlocale(LC_ALL,"");
>> by
>> setlocale(LC_ALL,"es_ES");
>> for Spanish
>
> Folks,
>
> get a grip ... the trick is so set the LC_ALL environemnt variable and
> then call
>
> setlocale(LC_ALL,""); as this will set things up ..
>
> tobi
>>
>> it is for linux systems that support localization
>>
>> regards


Hi

LC_ALL is not a an environment variable to set, but a string  passed to
setlocale to set "all" the   functions using localization

Other posibilities for this first argument are LC_COLLATE, LC_TYPE,
LC_MONETARY, LC_NUMERIC and LC_TIME (in fact for just dates LC_TIME would
be OK)
If the second argument of setlocale is  "", then default value is fixed to
the one chosen in LANG.
But if used in a crontab, LANG may not be chosen..... that's why it is
necessary to explicitely tell setlocale what language to use, fr_FR for
french, es_ES for spanish, etc if rrdtool is called from a crontab

Sorry if I was not clear enough in my first posts, but English is not my
mother language...

Regards
-- 
TNK
www.linux-sottises.net
S'il n'y a pas de solution, c'est qu'il n'y a pas de problème!





--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list