![]() |
|
|
|||||||
| Register | FAQ | Top Posters | Members List | Calendar | Search | Today's Posts | Resend Activation Email | Mark Forums Read |
| dotProject Documentation | dotProject FAQ | Bugs & Feature Requests | Language Packs & Themes | Download dotProject |
| General Questions Use this forum to ask questions or provide suggestions about general usage and how to's within the core dotProject modules. These modules include: Calendar, Tasks and Projects, Files, Contacts, Permissions, Forums, User Administration, System Administration etc. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi All:
I already did some patchs for dotproject 2.0.1. It is can support double byte (CJK) environment complete now, include date and ganttchart. Why I do this patch? I have to use dotproject in my company (both traditional and simplified), that'w why I did this. What's the problem of dotproject? Actually, dotproject is really good, but there are three issues in double byte (CJK) support: 1. Date format: dotProject use PEAR:: Date as his date manipulate library, but the library is not work for double byte environment. For example, I need to get the short name of week day, in english environment it is easy, just use substr("Monday",0,3), you can get "Mon". But in Chinese environment, you will get wong characters ..... becasue "double bye" ... So, how to solve this problem. I use setlocale(LC_TIME,"en") in PEAR:: Date_Calc, to force it to use "en" as his base locale .... then, how do I get different locale date format? See next issues ... 2. Translate DateFormat: So, when we get the short name from Date_Calc, for example "Mon", we can use $AppUI->_("Mon") to get the translate locale ... I will suggest dotProject do a Date Class to implement his own date formate to fit different locale and charsets. 3. GanttChart problem: GanttChart doesn't show Chinese correctly. Why? Becasue it lack of some Chinese fonts and settings. So, I just upgrade jpgraph to 1.1.8 and did some patchs. It can show Chinese now (both Traditional and Simplified). The trick is easy, I just use $AppUI->user_locale to get the user locale setting, and use it to decide what kind of font dotProject should use. BTW, I also get rid of setDateLocale() functions in ganttchart, becasue, it only works for english environment. The only one problem here is, these modification works for UTF-8 encodings only ... for Big5 and GB2312 ... Sorry, I have no idea. You have to modified the code by your slef I will also suggest dotPoroject team can do a GanttChart Wrap Class here to handling different locale, that will more easier. When will I realease? I will release my modified package after I fully tested! Maybe this Thursday or Friday. I hope these patch can patch back to CVS, Then, I don't need to modified again after new release :-P (I really don't want to maintain another fork or branch, heehee) Mark I also setup a Chinese Project Site in OSSF (Open Foundry in Taiwan) dotProject, you can get dotProject 1.0.2 (Patched for Traditional Chinese UTF-8 with some useful modules) here. Last edited by markwu : 21-06-05 at 03:30 PM. |
|
#2
|
|||
|
|||
|
Hi All:
I already released my packed version, here comese the different between official version: 1. Fix UTF-8 Date Format Problem: As I describe in previous post, I modify /lib/PEAR/Date/Calc.php to force the default date format to "en", and I use $AppUI->_("xxx") to translate the english date string to other locale string. This modification should apply to all locales. Modified Files: /lib/PEAR/DATE/Calc.php /modules/calendar/calendar.class.php /modules/calendar/day_view.php 2. Fix Gantt Chart Problem (in Chinese, both traditional and simplified) I upgrade the jpgraph to v 1.18 and also change the font directory to /lib/jpgraph/fonts. User just need to install the dotProject and don't need to worry about font installation Modified Files /lib/jpgraph/jpg-config.inc /lib/jpgraph/jpgraph.inc /modules/projects/gantt.php /modules/tasks/gantt.php 3.Bug Fix: /modules/history/index.php For Traditional Chinese user, you can just install it and change the locale to Chinese. For Simplified Chinese User, you also need to copy simsun.ttc(you can find it under your windows os /windows/fonts) to /lib/jpgraph/fonts That's all! You can grab the file in OpenFoundry. I also setup a Chinese Forum Here:dotProject Chinese Forum. If you are not so familier with English, you can come here to discuss in Chinese. Mark Last edited by markwu : 29-06-05 at 02:32 PM. |
|
#3
|
|||
|
|||
|
Hi ajdonnison and Karen:
If possible, I wish you can kindly review the patches and merge these patches go into the core, then I don't need to patch again after new version release. If anything I can help, just let me know. Mark Last edited by markwu : 29-06-05 at 03:13 PM. |
|
#4
|
|||
|
|||
|
Hi All:
I made a upgrade today, I change the font to FireFly Chinese font, so .... the Simplified/Traditional Chinese can show in the same gantt Chart. If you are a chinese reader, you can come here for detail:http://blog.markplace.net/marks_deve.../2005/07/04/35 If you just want to try my patch, you can download the whole package at http://rt.openfoundry.org/Foundry/Pr..._by_Markwu.zip Mark |
|
#5
|
|||
|
|||
|
Hi Mark,
Many thanks to your work! But can you help me that I need a english user interface dotproject which could able to show traditional and simplified chinese and also hong kong extended character set in Gantt Chart. I don't know php, so I can't solve the problem myself. Pls kindly help. |
|
#6
|
|||
|
|||
|
Dear Markwu,
Thanks for your help. Now my Gantt chart is showing in traditional chinese but when I am using the traditional chinese, then some strange characters are showing without any error. I have uploaded the simsun.ttc and even I have tried with simsun.ttf and made the necessary changes with FF_SIMSUN in the jpg_config.inc and jpgraph.php but of no use. Do you have any idea what is going wrong? Thanks Anirban anirban@rgihq.com |
|
#7
|
|||
|
|||
|
Hi MarkWu
I am using 2.1-rc1 and having problem to get calendar and gannt chat to work in traditional Chinese (UTF-8 ). I have tried your suggested method and it doesnt seem to work on this version. Have you got update patch to resolve this problem ? much appreciated if you can provide solutions. |
|
#8
|
|||
|
|||
|
Hi All:
I did not maintain 2.0.x branch any more, please kindly following this post for UTF-8 Chinese Support for 2.1.x branch: http://www.dotproject.net/vbulletin/...ead.php?t=6824 Mark |
![]() |
| Thread Tools | |
| Display Modes | |
|
|