PDA

View Full Version : Please help me changing html output language in awstats



ever00t
07-17-2008, 07:26 AM
Hi folks,how are you ? i have gotten DA updated so it supports awstats now. it works BUT the default language is english :(

I checked /usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf,there is an option named Lang="auto" by default, i changed it to Lang="cn", after that, i restarted DA,then did
echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d

after that,i logged in DA and check, the default html output language is still in english :(

Any idea ?
I am on Debian etch.Thanks

smtalk
07-17-2008, 10:47 AM
Edit config that is in /home/user/domains/domain.com/awstats/.data directory.

ever00t
07-21-2008, 08:51 AM
No,it doesn't work at all . I have done what you told me to do in your last reply. weird :( for example i edit /home/user/domains/domain.com/awstats/.data/awstats.domain.com.conf ,by default in this file there is a Lang="auto" even with this it only loads pages in english ,i changed it to Lang="cn", after that,reload DA,reload the awstats tasks,check, same,still in english language :(
by the way, since i use language skin for DA,so in this file /usr/local/directadmin/data/skins/enhanced/header.html,i changed charset=utf-8,so that it can display chinese skin in da,would this be a cause ?

ever00t
07-21-2008, 10:59 AM
it does not work :( :( please mr.John are you there to help me out please ? I am looking forward to get it done :(

getUP
08-12-2008, 06:26 AM
Edit config that is in /home/user/domains/domain.com/awstats/.data directory.

The language is overruled by
/usr/local/directadmin/scripts/awstats_process.sh

Look for


/usr/bin/perl ${AWSTATS}/tools/awstats_buildstaticpages.pl -config=${DOMAIN} -configdir=${DATA_DIR} -update -lang=en -diricons=icon -awstatsprog=${AWSTATS}/cgi-bin/awstats.pl -dir=${STATS_DIR}

And remove the -lang=en so it will look like:


/usr/bin/perl ${AWSTATS}/tools/awstats_buildstaticpages.pl -config=${DOMAIN} -configdir=${DATA_DIR} -update -diricons=icon -awstatsprog=${AWSTATS}/cgi-bin/awstats.pl -dir=${STATS_DIR}

If you have changed the language in the model, you might need to update all user configuration files as well.


cd /home
find . -name "awstats.*.conf" -exec rm -rf {} \;


Run the tally and you're ready.


echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d

DirectAdmin Support
08-12-2008, 12:42 PM
Hello,

Thanks, I've removed -lang=en from the process line.
The Lang option in the domain's conf will now be used for the next release of DA.

John

ever00t
08-13-2008, 07:37 AM
It works. Thanks alot .mr.getUP and John and smtalk. Yes, only had to do what getUP said ,easy job. :)