HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Webalizer language in Debian (http://www.howtoforge.com/forums/showthread.php?t=50103)

Davide 18th November 2010 21:16

Webalizer language in Debian
 
Hi

I have found a lot of old information about Debian webalizer and stats language, saying the only way to change language is compiling from sources. Even it's an entry on FAQ:

http://www.faqforge.com/linux/contro...-ubuntu-linux/


I have researched a little about it, and found that you don't need to compile webalizer for generating stats on your language

Debian webalizer uses gettext, so it will generate statistics on the default locale of your system.

With Debian > 4.0 (etch), you can change your locale with:

Code:

update-locale LANG=es_ES.UTF-8
You can momentarily force generation in another language simply changing your LANG env var:

Code:

export LANG=es_ES.UTF-8; webalizer -c xxxx
More info:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=291368

I'm sure Debian's stock webalizer + ISPConfig2 are generating statistics in spanish on my server, only having spanish as default system's locale.

I'm not sure about ISPConfig3. Will try it this night.

P.S. Please, edit or delete that entry on FAQ, it's guiding users by a hard and no necessary way :)

Davide 20th November 2010 02:04

After a little investigation, I've found I'm getting spanish statistics on my ISPConfig2 installation because of the following:

Code:

# cat /etc/environment
LANG=es_ES.UTF-8

/etc/environment is sourced by login and no login shells, so it's sourced too in cron jobs

So, if you want webalizer statistics to be generated in your language, just add a LANG definition to your locale into this file.


All times are GMT +2. The time now is 13:22.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.