Modify zenmagick 0.9.4.2 to support UTF-8

Category:

I just have a chance to play around with ZenMagick, an extension of ZenCart. ZenCart is one of the most popular shopping cart software. After I followed the installation process. everything seems to work fine until I found that ZenMagick doesn't support UTF-8 in the front end. What you have to do to make it support is :

1. Search for this file -> zenmagick\themes\default\lang\english\i18n.php , Open it.
2. Change from 'LC_TIME_LOCALE' => 'en_US.ISO_8859-1', to 'LC_TIME_LOCALE' => 'UTF-8',
3. Change from 'HTML_CHARSET' => 'iso-8859-1', to 'HTML_CHARSET' => 'UTF-8',

After the change, it will looks like below :

?>
<?php

    zm_i18n_add

(array(
       
// system locale
       
'LC_TIME_LOCALE' => 'UTF-8',

       

// to format dates
       
'DATE_FORMAT' => 'd/m/Y',

       

// to parse user input
       
'UI_DATE_FORMAT' => 'dd/mm/yyyy',
       
'UI_DATE_FORMAT_SAMPLE' => '16/11/1967',

       

// various date/time formats used
       
'DATE_FORMAT_LONG' => '%A %d %B, %Y',
       
'DATE_TIME_FORMAT' => '%d/%m/%Y %H:%M:%S',

       

'HTML_CHARSET' => 'UTF-8',
       
// NOTE: This is *NOT* used in ZenMagick, however zen-cart uses it in some places...
       
'HTML_PARAMS' => 'dir="ltr" lang="en"'
   
));

?>

That's it. Now, the front end of Zencart + ZenMagick works as UTF-8.

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <pre> <br /> <img> <center>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or class="OPTIONS" [title="the title"].
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.