DotProject 2.1.3 完全汉化(甘特图乱码,日历乱码)解决方案

日历问题
打开
 lib\PEAR\Date\Calc.php

 在1583行即function getMonthNames() 函数的开始
 新增一行
 setlocale(LC_TIME,’en’);//新增的
 
 1608行 function getWeekDays()函数的开始
 新增一行
 setlocale(LC_TIME,’en’);//新增的

甘特图问题
第一步:
 我们先从网上下载一个simhei.ttf(字体)放在目录(lib\fonts\)下
第二步:
 打开
     \lib\jpgraph\src\jpg-config.inc
找到如下:
define(‘TTF_DIR’, DP_BASE_DIR . ‘/lib/fonts/’);

define(‘FF_CUSTOM’, 18);

define(‘BASE_FONT’, ‘FreeSans’);

define(‘CUSTOM_TTF_FONT’, BASE_FONT . ‘.ttf’);

define(‘CUSTOM_TTF_FONT_BOLD’, BASE_FONT.’Bold.ttf’);

define(‘CUSTOM_TTF_FONT_ITALIC’, BASE_FONT.’Oblique.ttf’);

define(‘CUSTOM_TTF_FONT_BOLDITALIC’, BASE_FONT.’BoldOblique.ttf’);
修改为:
define(‘TTF_DIR’, DP_BASE_DIR . ‘/lib/fonts/’);

define(‘FF_CUSTOM’, 18);

define(‘BASE_FONT’, ’simhei’);

define(‘CUSTOM_TTF_FONT’, BASE_FONT . ‘.ttf’);

define(‘CUSTOM_TTF_FONT_BOLD’, BASE_FONT.’.ttf’);

define(‘CUSTOM_TTF_FONT_ITALIC’, BASE_FONT.’.ttf’);

define(‘CUSTOM_TTF_FONT_BOLDITALIC’, BASE_FONT.’.ttf’);

第三步:

 打开:modules\tasks\gantt.php

 找到:(370行)
 $name = $a['task_name'];
 
 if ($locale_char_set==’utf-8′ && function_exists(‘utf8_decode’))
 {
  
 $name = utf8_decode($name);

 }

 改为:
 $name = $a['task_name'];
第四步:
 打开:modules\projects\gantt.php
 找到:(214行)

  if ($locale_char_set==’utf-8′ && function_exists(‘utf8_decode’)) {
   $name = ((mb_strlen(utf8_decode($p['project_name'])) > 25)
            ? (mb_substr(utf8_decode($p['project_name']), 0, 22) . ‘…’)
            : utf8_decode($p['project_name']));
  } else {
   //while using charset different than UTF-8 we need not to use utf8_deocde
   $name = ((mb_strlen($p['project_name']) > 25) ? (mb_substr($p['project_name'], 0, 22).’…’)
            : $p['project_name']) ;
  }
 改为:
 $name = ((mb_strlen($p['project_name']) > 25) ? (mb_substr($p['project_name'], 0, 22).’…’)
            : $p['project_name']) ;

第五步:F5(刷新一下)看看你的(甘特图)OK了吧!


http://blog.anchnet.com:8888/?p=897

你可能感兴趣的:(project)