Modify zenmagick 0.9.4.2 to support UTF-8

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.

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.