How to make cacti support other language ?
Moderators: Developers, Moderators
How to make cacti support other language ?
When i create a device with chinese language, the device and data sources menu appear errors,but the Graphs Management menu is ok,any one know why? how to resulve this?
- Attachments
-
- this is the correct page
- GB2312ok.jpg (113.04 KiB) Viewed 4814 times
-
- this is the error page
- GB2312Fail.jpg (87.22 KiB) Viewed 4814 times
Couldn't tell you the fix, but there is a solution on the horizon: http://forums.cacti.net/viewtopic.php?t=7816
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 8
- Joined: Mon Feb 12, 2007 7:32 am
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Database encoding!
Changing your database encoding to UTF8 seems to resolve these issues.
Changing your database encoding to UTF8 seems to resolve these issues.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
-
- Posts: 8
- Joined: Mon Feb 12, 2007 7:32 am
Thx for the post.
I have to say some words to understand the situation here.
I am in a company and we have installed cacti with mysql. Someday someone comes and says to me: "We can't see greek in the page." So I try to fix this damned problem. I set mysql in greek encoding (They had it in default settings) and the data appears right in the database. The only problem is that cacti locks on automate encoding of Western European (ISO). If I change it to ISO-8859-7 the greek appears normally. On refresh or other page-loading action, gets again it default Western European (ISO).
My question is: There is a way to override default encoding of Western European (ISO) with the demanding ISO-8859-7?
Database is mysql 4.0. Don't ask. I asked for mysql update, but they talk to me a crazy story about Debian Linux, Cacti and Mysql Possible Incompability Issues.
Thank you very much for the time spending to help me.
I have to say some words to understand the situation here.
I am in a company and we have installed cacti with mysql. Someday someone comes and says to me: "We can't see greek in the page." So I try to fix this damned problem. I set mysql in greek encoding (They had it in default settings) and the data appears right in the database. The only problem is that cacti locks on automate encoding of Western European (ISO). If I change it to ISO-8859-7 the greek appears normally. On refresh or other page-loading action, gets again it default Western European (ISO).
My question is: There is a way to override default encoding of Western European (ISO) with the demanding ISO-8859-7?
Database is mysql 4.0. Don't ask. I asked for mysql update, but they talk to me a crazy story about Debian Linux, Cacti and Mysql Possible Incompability Issues.
Thank you very much for the time spending to help me.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I think you need to change the encoding in the two file's in <path_cacti>/include. They are top_graph_header.php and top_header.php.
This is where the encoding is/should be specified.
TheWitness
This is where the encoding is/should be specified.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
-
- Posts: 8
- Joined: Mon Feb 12, 2007 7:32 am
I added this line of code:
<meta http-equiv="content-type" content="text/html; charset=iso-8859-7" />
on the <head></head> section of the both files, but it seems like didn't effects. Still remains in the same situation.
It looks like there is something like a script that change it.
I added this and before your suggestion and didn't work. This line of code works in every php file or html that has the same problem. In cacti didn't work... I think there is a special action that at the present time I ignore its existence.
Thx for your time. I really appreciate it.
<meta http-equiv="content-type" content="text/html; charset=iso-8859-7" />
on the <head></head> section of the both files, but it seems like didn't effects. Still remains in the same situation.
It looks like there is something like a script that change it.
I added this and before your suggestion and didn't work. This line of code works in every php file or html that has the same problem. In cacti didn't work... I think there is a special action that at the present time I ignore its existence.
Thx for your time. I really appreciate it.
-
- Posts: 8
- Joined: Mon Feb 12, 2007 7:32 am
Thx mate.
I search it a little more and I have some more infos/ideas about this. Unfortunately, not a solution yet.
The server php version is 4.0.3. As the time pass, I wonder if I am working at the past and not at the present times. Our Linux administrator stucks in old versions...
I want a little favor from Developers of cacti, if it's not a trouble. Can you give me the best up-to-day configuration of cacti with mysql and php versions? I want to check if there is a fix, that may help me/us in problem's solution...
In our problem now. Searching around, I found a guy offering a solution about encoding in utf8, iso-8859-7 and others, for a php version ( I don't know yet which version it is). This set me in thoughts. The special action that resets encoding in Western European (ISO) is the mechanism of php encoding script? I don't know if there is something like this, but cacti seems like can't control the encoding. Perphaps, cacti sets normally (with the specified line of code: <meta http-equiv="content-type" content="text/html; charset=iso-8859-7" />) into greek encoding but php mechanism didn't understand it and resets it into its default value of Western European. The only possible issue of this to happen is the very old version of php in the Debian Linux Server.
If someone has any idea about encoding problem, I would glad to read it. Thx for your time.
I search it a little more and I have some more infos/ideas about this. Unfortunately, not a solution yet.
The server php version is 4.0.3. As the time pass, I wonder if I am working at the past and not at the present times. Our Linux administrator stucks in old versions...
I want a little favor from Developers of cacti, if it's not a trouble. Can you give me the best up-to-day configuration of cacti with mysql and php versions? I want to check if there is a fix, that may help me/us in problem's solution...
In our problem now. Searching around, I found a guy offering a solution about encoding in utf8, iso-8859-7 and others, for a php version ( I don't know yet which version it is). This set me in thoughts. The special action that resets encoding in Western European (ISO) is the mechanism of php encoding script? I don't know if there is something like this, but cacti seems like can't control the encoding. Perphaps, cacti sets normally (with the specified line of code: <meta http-equiv="content-type" content="text/html; charset=iso-8859-7" />) into greek encoding but php mechanism didn't understand it and resets it into its default value of Western European. The only possible issue of this to happen is the very old version of php in the Debian Linux Server.
If someone has any idea about encoding problem, I would glad to read it. Thx for your time.
-
- Posts: 8
- Joined: Mon Feb 12, 2007 7:32 am
I searched a little more, but i think that i found something. It seems that works for now. I need to test it more to be sure.
The problem was Apache. The httpd.conf (in linux is in /etc/apache/httpd.conf) has an option known as: AddDefaultCharset on. You have to disable it and make it: AddDefaultCharset off. Then your language appears normally.
The only thing that you have to do is to make this part of code:
into this one:
Maybe there is a best solution than this one, but this one is the only way that I know at present times. In future perphaps I will find a better one.
TEST ENVIROMENT:
Linux Server: Debian
Apache: 1.3.33
PHP: 4.3.10-18 (cli)
MySql: 4.0.24
The problem was Apache. The httpd.conf (in linux is in /etc/apache/httpd.conf) has an option known as: AddDefaultCharset on. You have to disable it and make it: AddDefaultCharset off. Then your language appears normally.
The only thing that you have to do is to make this part of code:
Code: Select all
# Default charset to iso-8859-1 (http://www.apache.org/info/css-security/).
AddDefaultCharset on
Code: Select all
# Default charset to iso-8859-1 (http://www.apache.org/info/css-security/).
# AddDefaultCharset on
AddDefaultCharset off
TEST ENVIROMENT:
Linux Server: Debian
Apache: 1.3.33
PHP: 4.3.10-18 (cli)
MySql: 4.0.24
Who is online
Users browsing this forum: No registered users and 0 guests