Login or Register

RSS IconRecent posts in this topic

avatar
Lovel on Sep 13. 2007. 8:15 am
It's look like '(Tuesday, 25 September - осталось 11 дней)'. activeCollab use date() to display date/time instead strftime() to display localized strings.
I''ll make hack to display localized date/time.
avatar
Lovel on Sep 13. 2007. 9:11 am
It's my hack (for activeCollab 0.7.1), you need php with iconv:
1. open activecollab/environment/classes/localization/Localization.class.php
2. Replace:
a) private $datetime_format = 'M d. Y H:i';
to
private $datetime_format = '%b %d. %Y %H:%M';
b) private $date_format = 'M d. Y';
to
private $date_format = '%b %d. %Y';
c) private $descriptive_date_format = 'l, j F';
to
private $descriptive_date_format = '%A, %m %B';
d) private $time_format = 'H:i';
to
private $time_format = '%H:%i';
3. Find function loadSettings($locale, $languages_dir)
and add line:
setlocale(LC_TIME, 'russian');
(of course you need replace 'russian' to you locale, see e.g. http://msdn2.microsoft.com/en-us/library/39cwe7zf(VS.71).aspx for windows locales)
4. Find function formatDate
and replace
return strftime($this->date_format, $date->getTimestamp() + ($timezone * 3600));
to
return iconv('windows-1251', 'UTF-8', strftime($this->date_format, $date->getTimestamp() + ($timezone * 3600)));
5. Find function formatDescriptiveDate
and replace
return strftime($this->descriptive_date_format, $date->getTimestamp() + ($timezone * 3600));
to
return iconv('windows-1251', 'UTF-8', strftime($this->descriptive_date_format, $date->getTimestamp() + ($timezone * 3600)));
6. Find function formatDateTime
and replace
return strftime($this->datetime_format, $date->getTimestamp() + ($timezone * 3600));
to
return iconv('windows-1251', 'UTF-8', strftime($this->datetime_format, $date->getTimestamp() + ($timezone * 3600)));
7. Find function DateTimeValue
and replace
return strftime($this->time_format, $date->getTimestamp() + ($timezone * 3600));
to
return iconv('windows-1251', 'UTF-8', strftime($this->time_format, $date->getTimestamp() + ($timezone * 3600)));

In steps 4-7 you need replace 'windows-1251' with you locale.
8. It's done! Hope i write all correctly.


Topic is locked. If you have something important to say about issues discussed on this page please write at hi@a51dev.com.

RSS IconRecent posts in this topic