Zen Cart Logo
Forums / Addon Language Packs / Problems with French language and order confirmation email

Problems with French language and order confirmation email

Locked

Views: 6,703

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
17 Aug 2007, 7:05 PM
#1
cdelab avatar

cdelab

New Zenner

Join Date:
Aug 2007
Posts:
47
Plugin Contributions:
0

Problems with French language and order confirmation email

Hello,

2 bugs or issues?

  1. Using french language, long date in the email is displayed in english :

Merci pour la commande que vous venez de passer sur retrodeco.fr
Cet email tient lieu de bon de commande que vous pouvez imprimer.

Vous trouverez ici le récapitulatif de cette commande et les détails concernant votre paiement :

Numéro de commande : 15
Date de commande : Friday 17 August, 2007
*

In my french.php, paramateres are set to :
@setlocale(LC_TIME, 'fr_FR.ISO_8859-1');
define('DATE_FORMAT_LONG', '%A %d %B, %Y');

  1. When I read the email in a webmail (voila.fr), the mail footer is broken by the message (ie, an image is no more displayed).
    I think it is due to the
<base href="http://www.myzencartsite.com" /> code which is placed in the mail html code.

Thank you in advance for your advices and for correcting these bugs if any.

Christophe

7 Sep 2007, 7:18 PM
#2
fromtheriviera avatar

fromtheriviera

New Zenner

Join Date:
Aug 2007
Location:
South of France
Posts:
45
Plugin Contributions:
0

Re: Problems with French language and order confirmation email

Hello Christophe,

I have the same problem and I think I have found a web site in French which will help us set the locale as follows:

setlocale(LC_TIME,"fr");
for($i=1;$i<=12;$i++)
{
$mois[$i]=strftime("%B", mktime(0, 0, 0, $i, 1, 2005));
}

http://wildmary.net-sauvage.com/weblog/index.php?2006/07/19/379-noms-des-mois-en-php

I have not tested this yet but will let you know once I have ...
and will post an English translation...

Maybe you can try too ?

A+mec....

My site is also in italian so I will no doubt find some more little bugs that have not been picked up in english versions?

Keep in touch and post me your web site when u can and we can exchange our findings...

7 Sep 2007, 7:38 PM
#3
fromtheriviera avatar

fromtheriviera

New Zenner

Join Date:
Aug 2007
Location:
South of France
Posts:
45
Plugin Contributions:
0

Re: Problems with French language and order confirmation email

Link to french PHP help :

http://fr3.php.net/manual/fr/function.strftime.php

I have not figured out what to change yet but I'll bet we need to change the
%d to %j etc...

7 Sep 2007, 8:26 PM
#4
fromtheriviera avatar

fromtheriviera

New Zenner

Join Date:
Aug 2007
Location:
South of France
Posts:
45
Plugin Contributions:
0

Re: Problems with French language and order confirmation email

I recalled that I had this problem but must have loaded a new
version wich actually produced the following output:

Date de commande : vendredi 07 septembre, 2007

<?php /** * @package languageDefines * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: french.php 2007-01-09 megaman $ */ // FOLLOWING WERE moved to meta_tags.php //define('TITLE', 'fweb!'); //define('SITE_TAGLINE', 'better web by design !'); //define('CUSTOM_KEYWORDS', 'ecommerce, open source, shop, online shopping'); // END: moved to meta_tags.php define('FOOTER_TEXT_BODY', 'Copyright © ' . date('Y') . ' <a href="http://www.zencart.com" target="_blank">zencart.com</a>.'); // look in your $PATH_LOCALE/locale directory for available locales.. // on RedHat try 'fr_FR' // on FreeBSD try 'fr_FR.ISO_8859-1' // on Windows try 'fr', or 'French' @setlocale(LC_TIME, 'fr_FR@euro'); define('DATE_FORMAT_SHORT', '%d.%m.%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'd/m/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); . . . . . // if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language) define('LANGUAGE_CURRENCY', 'EUR'); // Global entries for the <html> tag define('HTML_PARAMS','dir="ltr" lang="fr"'); // charset for web pages and emails define('CHARSET', 'iso-8859-1'); . . . . . // text for date of birth example define('DOB_FORMAT_STRING', 'dd/mm/aaaa'); Can't post or attach the whole file its too big.
29 Nov 2007, 10:52 PM
#6
cdelab avatar

cdelab

New Zenner

Join Date:
Aug 2007
Posts:
47
Plugin Contributions:
0

Re: Problems with French language and order confirmation email

After 1 billion hours of work I found the solution :clap:

In french.php modify the line below :

@setlocale(LC_TIME, 'fr', 'french', 'fra', 'fr_FR', 'fr_FR@euro');

The issue is that each server reacts in a different manner. From PHP 4.3 you can pass more than one value for LC_TIME.

7 Dec 2007, 10:32 AM
#7
draftdesign avatar

draftdesign

New Zenner

Join Date:
Jun 2007
Posts:
6
Plugin Contributions:
0

Re: Problems with French language and order confirmation email

thanks cdelab for posting this solution, I've been racking my brain over this one for days now!

:)

21 Jan 2008, 10:20 AM
#8
megaman avatar

megaman

New Zenner

Join Date:
Jan 2007
Posts:
27
Plugin Contributions:
0

Re: Problems with French language and order confirmation email

nice trick

Added for the next pack of the french translation :)

10 May 2009, 9:01 PM
#9
wapa17 avatar

wapa17

New Zenner

Join Date:
Mar 2009
Posts:
2
Plugin Contributions:
0

Re: Problems with French language and order confirmation email

Thanks cdlab, had the same issue in Spanish (Southamerica).
Here is the setlocale which worked for me: @setlocale(LC_TIME, 'es', 'spanish', 'esp', 'es_ES');