Translation of i-doit to Simplified Chinese
HI, I'm dona from China, I plan to i-doit translated into Simplified Chinese. I copied and translation entry en.inc.php. Upon completion cover en.inc.php file WEB page format has changed at run time. JS code output of the Chinese (such as: the directory tree), is garbled, who can help me, thank you.
My environment is: RHEL6.1 X86-64, httpd-2.2.15, mysql-server -5.1.52, php-5.3, i-doit-0.9.9-7.
thanks for your interest in translating i-doit. We appreciate your work!
If you can send me your localization file I'll take a deeper look into it to see what I can do.
Glad to receive your response.
To enhance the IT infrastructure management capabilities, improve work efficiency, improve service quality, we found the i-doit, it is very suitable for our needs excellent management software.
In recent days, took some time for translation. Of course, some translation need to constantly improve, but at least allows us to go further in the near future to learn and become familiar with i-doit.
Your language file looks okay. Just copy it to src/lang/zh.inc.php and make it available in i-doit by inserting a new entity into table isys_language of i-doit's system database:
INSERT INTO `isys_language` (`isys_language__id`, `isys_language__title`, `isys_language__short`, `isys_language__available`, `isys_language__const`, `isys_language__sort`) VALUES (6, 'Simplified Chinese', 'zh', 1, 'ISYS_LANGUAGE_SIMPLIFIED_CHINESE', 10);
After that change your character encoding in your browser to UTF-8 for a quick test. You'll see i-doit is not fully prepared for UTF-8 but this is another story…
Followed your methods, I have modified the file name and database, select Simplified Chinese UTF-8 encoding in browser settings, garbled problem still persists.
But as seen in the above attachment, not all Chinese are garbled. Only part of the message appears garbled.
If need to manually modify the PHP code, there is any reasonable professional advice?
The issue lays in character encoding. i-doit is currently using ISO 8895-15. In short, this encoding is limited to Western European languages. The result is: If you want to translate i-doit into another language which is not supported by ISO 8859-15 it'll become a problem. You have to prepare the whole frontend and backend to work with an encoding standard like Unicode/UTF-8 which supports many more characters for almost every language. The preparation affects the source code, all translations, HTML output, AJAX requests, and PHP itself. Only the MySQL database backend uses UTF-8.
Look for any encoding/decoding methods in the source code and patch them. For example, take a look at all files which contain "8859" (index.php, ajax.js, js.php, and functions.inc.php). All files which contain non-ASCII characters have to be converted into UTF-8 (especially the language files under src/lang/). I can't tell for sure if these changes will perfectly work without errors. I haven't tested it yet. But give it a try!