MantisBT - v3.0 Release
View Issue Details
0000988v3.0 Release[All Projects] Generalpublic2011-09-29 21:502013-08-28 11:24
Assigned Torobertbasic 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.0.0 
Summary0000988: Not translated month names in Gantt charts
DescriptionIt is imposible to display translated month names in the Gantt charts.
In non english translation of W2P (for examle PO) we would like see month namees on Ghantt in that language.
I was trying a lot of changes but all the time I've got names in english.
Additional InformationIn dotProject I was able to do this by adding do all gantt.php line: $graph->scale->SetDateLocale( $AppUI->user_locale );

There was similar code in web2project/classes/w2p/Output/GanttRenderer.class.php
but any changes with code (bellow) doesn’t take any effect
$pLocale = setlocale(LC_TIME, 0); // get current locale for LC_TIME
$res = setlocale(LC_TIME, $AppUI->user_lang[2]);
if ($res) { // Setting locale doesn't fail
setlocale(LC_TIME, $pLocale);
TagsNo tags attached.
Attached Filesjpg gantt_locale.jpg (19,897) 1969-12-31 16:00

jpg gantt_locale_ok.JPG (28,076) 1969-12-31 16:00

2011-10-01 21:06   

I've been researching this one and can't find anything useful or definitive on our end. I *thought* we were missing locales files but that doesn't appear to be the case.
2011-10-03 05:20   
I spend a lot of time for testing with locale and I found a problem (solution for me):
Problem is located in wrong locale (code) for some languages in:
/web2project/locales/xx/lang.php in:
       $LANGUAGES['xx] =
Corrected is for ex.:
$LANGUAGES['en'] =
Not corrected (when user preferences is set for one of them, month names in Gantt is in english), example:
$LANGUAGES['po'] = array($dir, 'Polish (Pol)', 'Polski (PL)', 'po', 'utf-8');
$LANGUAGES['cs'] = array($dir, 'Czech (CS)', '?eština (CS)', 'csy', 'utf-8');
In my opinion 'po' is not correct lang. code for Polish (should be: pl, pl_PL or plk (Microsoft))
So I suggest to change that for:
$LANGUAGES['pl_PL'] = array($dir, 'Polish (Pol)', 'Polski (PL)', 'pl', 'utf-8');
$LANGUAGES['pl_PL'] = array($dir, 'Polish (Pol)', 'Polski (PL)', 'plk', 'utf-8');
and month names in Gantt will be correct (with some problem witch utf-8 encoding)
I suggest also global change (from v.3) for polish locale (change ‘po’ to ‘pl’ in all files and links):
- Change folder name from …/locales/po/ > …/locales/pl/ or …/locales/pl_PL/
- Change …/lib/jscalendar/lang/calendar-po.js > …/lib/jscalendar/lang/calendar-pl.js
- Change .../lib/PHPMailer/language/phpmailer.lang-po.php > .../lib/PHPMailer/language/phpmailer.lang-pl.php
Best regards.
2012-04-20 04:44   
Pull request sent
2012-05-04 22:07   
Resolved in r2445;

Issue History
2011-09-29 21:50gregor_bNew Issue
2011-09-29 21:50gregor_bFile Added: gantt_locale.jpg
2011-10-01 21:03caseydkProjectv2.4 Release (Closed) => Pending Requests
2011-10-01 21:06caseydkNote Added: 0002224
2011-10-01 21:06caseydkStatusnew => acknowledged
2011-10-03 05:20gregor_bNote Added: 0002232
2011-10-03 05:21gregor_bFile Added: gantt_locale_ok.JPG
2012-04-20 03:38robertbasicStatusacknowledged => assigned
2012-04-20 03:38robertbasicAssigned To => robertbasic
2012-04-20 04:44robertbasicNote Added: 0002484
2012-05-04 22:02caseydkProjectPending Requests => v3.0 Release
2012-05-04 22:07caseydkNote Added: 0002512
2012-05-04 22:07caseydkStatusassigned => resolved
2012-05-04 22:07caseydkResolutionopen => fixed
2013-08-28 11:14caseydkFixed in Version => 3.0.0
2013-08-28 11:24caseydkStatusresolved => closed