Awstat language

Hello. Tell me how to set localization to my language for awstat statistics?

I set it in awstats.conf. But the config for the site is still generated in English.

Thanks for your help!

Hi @jekasumy

Which awstats.conf? The global or the specific for the domain?

I mean, /etc/awstats/awstats.conf or /etc/awstats/awstats.yourdomain.conf? Because you should change the Lang directive in the second one.

Note: Keep in mind that after modifying the config file, you must regenerate the stats.

v-update-web-domain-stat YourUser YourDomain

For new users, change the Lang directive directly in the template /usr/local/hestia/data/templates/web/awstats/awstats.tpl

When updating the panel, my changes will not fly off? Also, when installing the Ukrainian language (ua) for awstat, the statistics encoding is broken.

When updating or rebuilding the web domains, the awstats.conf will be overwritten so you should modify /usr/local/hestia/data/templates/web/awstats/awstats.tpl is you want to keep the Lang change.

Yes, seems the traslation /usr/share/awstats/lang/awstats-ua.txt is pretty broken (you should translate it by your own).

# Ukrainian message file ([email protected])
# $Revision$ - $Date$
PageCode=windows-1251
message0=Íåâiäîìèé
message1=Íåâiäîìèõ (íå âäàëîñü ïåðåòâîðèòè IP)
message2=Iíøi
message3=Äåòàëüíiøå...
message4=Äåíü
message5=Ìiñÿöü
message6=Ðiê
message7=Ñòàòèñòèêà ñàéòó
message8=Ïåðøèé âiçèò
message9=Îñòàííié âiçèò
message10=Êiëüêiñòü âiçèòiâ
[...]

The PageCode should be utf-8 but as I said, the translation is broken and seems it has been since last 22 years:

Made a translation and sent them a bug report. Maybe they will change it.

If I make changes to this file, after updating the panel, this file will not be overwritten by the new one from the update?

It would be good to localize awstat based on the language set for the user in the panel.

I hope so :wink:

I can’t assure it so, keep a backup of the modified file (you can also create a hook that will launch a script to check/fix it post update).

It’s a good idea.

1 Like