My Subscriptions

No active or expired subscriptions. View Available Subscriptions

Advanced Search

Home arrow Forum arrow JCal Client 1.6.xarrow 1.6.x General Discussionarrow SOLVED: french language : specials car in the month
Pages: [1]
Print
Author Topic: SOLVED: french language : specials car in the month  (Read 419 times)
kustom06
Newbie
*
Posts: 5


View Profile Email
« on: February 19, 2008, 10:35:24 AM »

hi,

following to the bad display of the specials letters (é,è,à,ê,...) in all the translation, i have re-writed the index.php in /components/com_jcalpro/languages/french/ directory and saved it in utf-8.

all texts becames good excepted the month in the minical and the latest event modules.

i have tried the tips in the folowing thread but without any effects : http://dev.anything-digital.com/Forum/1.6.x-General-Discussion/2223-Swedish-letters-a-a-o/
so i have tried to rewrite the month without any specials letters in the french index.php: février ->> fevrier but i always have the display problem.

so can you tell me in witch file those modules goes to keep the french word because it appear that is not in /components/com_jcalpro/languages/french/index.php...

thanks for answer

EDIT
JCal 1.6.176
joomla 1.5.1
mysql 5
php 4
« Last Edit: March 03, 2008, 02:07:32 PM by V-man » Logged
JoomlaBoom
Newbie
*
Posts: 8


View Profile Email
« Reply #1 on: February 27, 2008, 03:38:06 PM »

I agree with you (bonjour de Bordeaux !) because I have the same problem and I am still waiting for an answer regarding this problem.
Logged
PepsimanAB
Moderator
Newbie
*****
Posts: 39


View Profile Email
« Reply #2 on: February 29, 2008, 01:18:53 AM »

It's definitely an encoding issue.  Minical and the yearly view that is based on it both use the php strftime function to get the month name in the currently set locale.  The problem is that strftime uses ISO-8859-1 Encoding, not UTF-8.

In Firefox (Windows), I was able to go to the view menu, character encoding, and change it to "Western (ISO-8859-1)" and the page suddenly showed the accents.  I don't speak French, so I don't know if the names were correct, but it was no longer showing invalid characters.

If your php has the iconv module installed (mine does, but I don't know if it's standard), you can replace the lines:
Code:
$params = array(
'{PREVIOUS_MONTH}' => ucwords(strftime($lang_date_format['month_year'], mktime(0,0,0,$date['month']-1,1,$date['year']))),
'{PREVIOUS_MONTH_URL}' => $info_data['previous_month_url'],
'{CURRENT_MONTH}' => ucwords(strftime($lang_date_format['month_year'], mktime(0,0,0,$date['month'],1,$date['year']))),
'{NEXT_MONTH}' => ucwords(strftime($lang_date_format['month_year'], mktime(0,0,0,$date['month']+1,1,$date['year']))),
'{NEXT_MONTH_URL}' => $info_data['next_month_url'],
);

in /components/com_jcalpro/includes/minical.php

with
Code:
$params = array(
'{PREVIOUS_MONTH}' => ucwords(iconv('ISO-8859-1', 'UTF-8', strftime($lang_date_format['month_year'], mktime(0,0,0,$date['month']-1,1,$date['year'])))),
'{PREVIOUS_MONTH_URL}' => $info_data['previous_month_url'],
'{CURRENT_MONTH}' => ucwords(iconv('ISO-8859-1', 'UTF-8', strftime($lang_date_format['month_year'], mktime(0,0,0,$date['month'],1,$date['year'])))),
'{NEXT_MONTH}' => ucwords(iconv('ISO-8859-1', 'UTF-8', strftime($lang_date_format['month_year'], mktime(0,0,0,$date['month']+1,1,$date['year'])))),
'{NEXT_MONTH_URL}' => $info_data['next_month_url'],
);

and it seems to show the accents for me.  This may not work on all servers, and since I don't speak French, I don't know if it's working as it should, but hopefully it will point someone in the right direction for more fixes/bugtesting.  The iconv function will probably need added in other spots in other files as well.
« Last Edit: February 29, 2008, 01:22:31 AM by PepsimanAB » Logged

Anthony
kustom06
Newbie
*
Posts: 5


View Profile Email
« Reply #3 on: February 29, 2008, 03:04:38 AM »

super !!! you are the chief Wink
i known that was comming from this code but was not able to resolve the probem...  Roll Eyes

so i think that for the last event module is the same thing. i have just to find the right line to insert iconv function Wink if you find it before me, think at me by posting your discover here, it will be so helpfull  Grin

thanks a lot.
Logged
kustom06
Newbie
*
Posts: 5


View Profile Email
« Reply #4 on: February 29, 2008, 03:27:53 AM »

i have found the code to modify.

in /modules/mod_jcalclient_latest/mod_jcalclient_latest.php on line 226 replace

Code:
if ( (($start_daynumber == $end_daynumber) && ($start_month == $end_month) && ($start_year == $end_year)) || $no_end_specified ) {
        // January 30, 2007 (08:00 - 10:00)
        $returnstring = strftime($EXTCAL_CONFIG['date_format'],mktime($start_time_array[0],$start_time_array[1],0,$start_date_array[1],$start_date_array[2],$start_date_array[0]));
    $returnstring .= ( $EXTCAL_CONFIG['show_times'] ) ? ' (' . $start_time . ( ($EXTCAL_CONFIG['show_times'] == 3 || $no_end_specified) ? '' : ' - ' . $end_time ) . ')' : '';
      } else {
        $temp_start = strftime($EXTCAL_CONFIG['date_format'],mktime($start_time_array[0],$start_time_array[1],0,$start_date_array[1],$start_date_array[2],$start_date_array[0]));
        $temp_end   = strftime($EXTCAL_CONFIG['date_format'],mktime($end_time_array[0],$end_time_array[1],0,$end_date_array[1],$end_date_array[2],$end_date_array[0]));
        if ( $EXTCAL_CONFIG['show_times'] ) {
          $returnstring = $temp_start . ' (' . $start_time . ') - ' . $temp_end . ( ($EXTCAL_CONFIG['show_times'] == 3 || $no_end_specified) ? '' : ' (' . $end_time . ')' ) ;
    } else {
          $returnstring = $temp_start . ' - ' . $temp_end;
    }
      }

by
Code:
if ( (($start_daynumber == $end_daynumber) && ($start_month == $end_month) && ($start_year == $end_year)) || $no_end_specified ) {
        // January 30, 2007 (08:00 - 10:00)
        $returnstring = iconv('ISO-8859-1', 'UTF-8', strftime($EXTCAL_CONFIG['date_format'],mktime($start_time_array[0],$start_time_array[1],0,$start_date_array[1],$start_date_array[2],$start_date_array[0])));
    $returnstring .= ( $EXTCAL_CONFIG['show_times'] ) ? ' (' . $start_time . ( ($EXTCAL_CONFIG['show_times'] == 3 || $no_end_specified) ? '' : ' - ' . $end_time ) . ')' : '';
      } else {
        $temp_start = iconv('ISO-8859-1', 'UTF-8',strftime($EXTCAL_CONFIG['date_format'],mktime($start_time_array[0],$start_time_array[1],0,$start_date_array[1],$start_date_array[2],$start_date_array[0])));
        $temp_end   = iconv('ISO-8859-1', 'UTF-8',strftime($EXTCAL_CONFIG['date_format'],mktime($end_time_array[0],$end_time_array[1],0,$end_date_array[1],$end_date_array[2],$end_date_array[0])));
        if ( $EXTCAL_CONFIG['show_times'] ) {
          $returnstring = $temp_start . ' (' . $start_time . ') - ' . $temp_end . ( ($EXTCAL_CONFIG['show_times'] == 3 || $no_end_specified) ? '' : ' (' . $end_time . ')' ) ;
    } else {
          $returnstring = $temp_start . ' - ' . $temp_end;
    }
      }

that's all folks... Cheesy
Logged
ragots
Newbie
*
Posts: 2


View Profile
« Reply #5 on: April 14, 2008, 11:15:11 PM »

thanks
Logged
Pages: [1]
Print
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com

Original Joomla Template design by RocketTheme ( Conversion by Bloc)