[mrtg] Re: Language & graphs
Morten S. Nielsen
msn at ipt.dtu.dk
Tue Feb 8 19:13:35 MET 2000
On Tue, 8 Feb 2000, Antonio Guerrero wrote:
> Hi all.
>
> Maybe a silly question, but how can I get my graphs with a specific
> language?
No it's certinaly not a silly question. The localisation only works for
the html due to the fact that gd library does not have support for loading
fonts. The default font in gd is iso-8859-2 (eastern european fonts). If
you want to use catalan on the graphs you should use iso-8859-1 (western
european) unless you are able to find the characters you need in the
iso-8859-2 (try it).
The time labels for the weekdays and the months are system specific, in
opposition to the labels for the Week and hour numbering: "Week" is
written in rateup.c and could easily be replaced. It is the function
strftime giving the which missed the locale. Maybe mrtg ought to have an
option giving the proper locale
############ So in rateup.c add:
/* among the header files */
#include <locale.h>
/* somewhere in main */
setlocale(LC_ALL,"ca_ES") /* and we hope it is installed */
/* I wonder how it is with NT? */
somewhere in rateup replace "Week" with the catalan word for week
############# in gd-1.7.? do
mv gdfonts.h gdfonts-East.h
mv gdfonts.c gdfonts-East.c
fstobdf -s localhost:7100 -fn fixed | bdftog FontSmall fonts
make
You now have an iso-8859-1 for the small fonts. If you wan't special
fonts you may specify any fontstruct but fixed seems to be a good choice.
############# in mrtg-2.8.12
./configure --with-gd-lib=/where/the/gd-1.7.?/is/installed \
--with-gd-inc=/where/the/gd-1.7.?/is/installed
and type make in the mrtg-2.8.12 directory
############# in your cfg files you must set the proper legend
ylegend[target]="Catalan ¿si no?"
please note that sometimes the passing of the special characters
between mrtg and rateup messes up. I would prefer a conversion to hex
before passing and then reversion in rateup... This would also ensure that
NT does not choke on special characters.
>
> Running MRTG-2.8.12 (no 14all) on SuSE Linux 6.2.
>
> My mrtg.cfg global options:
>
> WorkDir: /home/users/mrtg/
> Options[^]:growright,bits
> Interval: 5
> WriteExpires: Yes
> RunAsDaemon: Yes
> Language: catalan
> IconDir: ../imatges/
>
>
> --
> ____________________________________________________
>
> O O O Antonio Guerrero Montero
> O O O e-mail: antoniog at fib.upc.es
> O O O Facultat d'Informàtica de Barcelona
> U P C Universitat Politècnica de Catalunya
>
>
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Help mailto:mrtg-request at list.ee.ethz.ch?subject=help
> Archive http://www.ee.ethz.ch/~slist/mrtg
>
Servicepack SR12 for NT. Available at www.linux.org
-- Morten S. Nielsen mailto:msn at ipt.dtu.dk
--
-- | Linux - the choice of a GNU generation |
-- | Skaane Sjaelland Linux User Group |
-- | at http://www.sslug.dk |
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/mrtg
More information about the mrtg
mailing list