Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2008
    Location
    Belgium
    Posts
    115
    Plugin Contributions
    6

    Default French Language Issue

    I get this:
    d�cembre
    instead of:
    Décembre
    when the customer has it in French version.

    Of course the first reaction was to check admin/includes/languages/french.php line 443:
    PHP Code:
    define('_DECEMBER''Décembre'); 
    But that cannot be the problem as it's with capital D and other instances of é are correct.

    Culprit seems to be: admin/includes/javascript/jquery-ui-i18n.min.js but:
    Pulling it in from the CDN is actually the preferred approach.
    Any suggestions how to fix this?

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,671
    Plugin Contributions
    123

    Default Re: French Language Issue

    You want to be sure you're using an appropriate character set that can represent those accents (i.e. *not* the old Windows 1252).

    Is your DB_CHARSET value utf8 (or some variant thereof) in includes/configure.php?

    Is your CHARSET value utf-8 in includes/languages/YOUR_TEMPLATE/french.php ?

    Also: no need to check admin files for storefront issues.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Mar 2008
    Location
    Belgium
    Posts
    115
    Plugin Contributions
    6

    Default Re: French Language Issue

    Quote Originally Posted by swguy View Post
    Is your DB_CHARSET value utf8 (or some variant thereof) in includes/configure.php?
    Line #49:
    PHP Code:
    define('DB_CHARSET''utf8'); // 'utf8' or 'latin1' are most common 
    Quote Originally Posted by swguy View Post
    Is your CHARSET value utf-8 in includes/languages/YOUR_TEMPLATE/french.php ?
    Line #44:
    PHP Code:
    define('CHARSET''utf-8'); 
    I tested it on 4 PC browsers (Opera, Firefox, Edge, Chrome) and on mobile:
    French: Ce produit a été ajouté à notre catalogue le mercredi 10 d�cembre 2008. � has to be é like it does show in the rest of the text.
    German: Dieser Artikel wurde am Montag 29 M�rz 2021 im Shop aufgenommen. � has to be ä like it does show in "Räucherstäbchen"

    HTML Code:
    <p id="productDateAdded" class="productGeneral centeredContent" style="">
    Ce produit a été ajouté à notre catalogue le mercredi 10 d�cembre 2008.</p>
    /includes/languages/french/document_general_info.php

    Line #12 :
    PHP Code:
    define('TEXT_DATE_ADDED''Ce produit a été ajouté à notre catalogue le %s.'); 
    It seems like the %s triggers the problem.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: French Language Issue

    Within your /includes/languages/french.php, what is set for the $locales?

  5. #5
    Join Date
    Mar 2008
    Location
    Belgium
    Posts
    115
    Plugin Contributions
    6

    Default Re: French Language Issue

    Answer:
    PHP Code:
      $locales = ['fr_FR''fr_FR.utf8''fr''French']; 
    The path to the solution:
    Your question brought my attention to the next line in the file:
    PHP Code:
      @setlocale(LC_TIME'fr_FR'); //in french.php
      
    @setlocale(LC_TIME$locales); //in german.php 
    Step 1
    Changing it to $locales in french.php resulted in the date being display in English.
    Changing it to fr_FR.utf8 in french.php resulted in fixing é in the months.
    Changing it to de_DE.utf8 in german.php resulted in fixing März.

    Step 2
    Then I started from the presumption that there's an importance in the order $locales is listed.
    PHP Code:
      @setlocale(LC_TIME$locales); //in all THE_LANGUAGE.php 
    So I placed all utf8-versions first:
    PHP Code:
      $locales = ['fr_FR.utf8''fr_FR''fr''French']; //in french.php
      
    $locales = ['de_DE.utf8''de_DE''de''German']; //in german.php 
    It looks like this fixes all problems.

    Suggestion to/question for core writer members:
    In english.php shouldn't:
    PHP Code:
      $locales = ['en_US''en_US.utf8''en''English_United States.1252']; 
    then become:
    PHP Code:
      $locales = ['en_US.utf8''en_US''en''English_United States.1252']; 

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,671
    Plugin Contributions
    123

    Default Re: French Language Issue

    Great catch @lat9. I will add this as a thing to check in the documentation.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. French Language error..
    By techker in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 29 Jan 2014, 06:40 PM
  2. Language Pack (French)
    By topkalouis in forum General Questions
    Replies: 0
    Last Post: 20 May 2010, 11:29 AM
  3. French language
    By raunharman in forum Basic Configuration
    Replies: 0
    Last Post: 12 Aug 2008, 06:26 AM
  4. Issues with French language (or alternate language) packs
    By mommydesigns in forum Addon Language Packs
    Replies: 1
    Last Post: 23 Aug 2006, 05:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR