Date not displayed correctly Date not displayed correctly
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Date not displayed correctly

Started by Zenigata, January 27, 2006, 07:02:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zenigata

Hi,
the abbreviation of the month is displayed incorrectly in my CPG 1.4.3 installation with italian language

Look:
27 Jan 2006 alle 06:29 PM instead of
27 Gen 2006 alle 06:29 PM

What's wrong?

italian.php seems ok:

// Day of weeks and months
$lang_day_of_week = array('Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven', 'Sab');
$lang_month = array('Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic');

// The various date formats
// See http://www.php.net/manual/en/function.strftime.php to define the variable below
$album_date_fmt =    '%d %B %Y';
$lastcom_date_fmt =  '%d/%B/%y alle %H:%M';
$lastup_date_fmt = '%d %B %Y';
$register_date_fmt = '%d %B %Y';
$lasthit_date_fmt = '%d %B %Y alle %I:%M %p';
$comment_date_fmt =  '%d %B %Y alle %I:%M %p';
$log_date_fmt = '%B %d, %Y at %I:%M %p'; //cpg1.4



Nibbler


Zenigata

Quote from: Nibbler on January 27, 2006, 07:13:26 PM
Try turning off lang fallback.

Yes, now it works but it's a workaround, not the real solution. How can I fix the language problem?

Thanks

Nibbler

include/langfallback.inc.php

change


// Day of weeks and months
$lang_day_of_week_en = cpg_get_default_lang_var('lang_day_of_week','english');
$lang_day_of_week = array_merge($lang_day_of_week_en, $lang_day_of_week);

$lang_month_en = cpg_get_default_lang_var('lang_month','english');
$lang_month = array_merge($lang_month_en, $lang_month


to


// Day of weeks and months
if (!isset($lang_day_of_week)) $lang_day_of_week = cpg_get_default_lang_var('lang_day_of_week','english');
if (!isset($lang_month)) $lang_month = cpg_get_default_lang_var('lang_month','english');

Zenigata