Zen Follower
- Join Date:
- May 2010
- Location:
- Athens, Greece
- Posts:
- 293
- Plugin Contributions:
- 0
Post #1 by athens_collectibles
Here is my story and my troubles in setting up a store in Greek (I already have another similar store in english).
I started with nopCommerce which I installed on my site http://athenscollectibles.info hosted by GoDaddy. I struggled for weeks and weeks trying to install and configure a Greek Language Pack written for the previous version and I finally managed to get around the problems. I also managed to solve a number of other issues but I decided to migrate to Zen Cart because:
a) I am not an ASP programmer/developer, just an individual who wants to set up a site for own use. I regret to say that their forums were not helpful at all and user questions were left without a reply for weeks or months or received a reply of the sort "change this to that and compile" or "create a task to perform that". No explanation of where this and that could be found or how to compile or how to create a task. The forum was a "private club" of developers who wouldn't bother to deal with simple people like me. Their forum signature usually called users to PM them for developments, so I assumed that they were not there to help but to gain customers.
b) I purchased the user manual which didn't offer me any knowledge that I couldn't get by hovering the mouse over the various administration options and reading the tooltip.
To cut a long story short, I decided to go for Zen Cart and looked at the forums and Wiki to get an initial impression of how things are there. I found thousands of posts, most of them replied quickly by experts and tons of information in the Wiki, FAQs etc. Although I hadn't faced any problems with GoDaddy's hosting, the comments in the Zen Cart forums made me to decide for a change of host before installing Zen Cart. I selected BlueHost, one of the recommended hosts because of its features, reasonable cost, the numerous good reviews I found about them on the web and my experience with their immediate response to questions I asked before signing up for an account. I'm very happy with the change which was done smoothly and soon had Zen Cart installed by their Simple Scripts application (what puzzles me is that I selected to install with Fantastico but was automatically redirected to Simple Scripts).
End of part 1.
My Zen Cart installation was for the latest 1.3.9d version but couldn't find a Greek Language Pack except for v1.3.8 which I downloaded on the understanding that I would have to do some extra work. I don't know about other language packs but this one didn't have any instructions on how to install it and I had to guess.
Before installing the language pack, I changed the "admin" folder's name as instructed when I first signed on as administrator. I then unzipped the language pack in a folder on my desktop. A couple of unsuccessful attempts to install the language pack left me unable to sign on as administrator and I had to uninstall and reinstall Zen Cart!
I still haven't managed to understand what I need to do to install the language pack. The directory structure of the pack is as follows:
admin
|----- includes
|----- languages
|----- greek
|----- extra definitions
|----- images
|----- buttons
|----- modules
|----- newsletters
includes
|----- languages
|----- greek
|----- classic
|----- extra_definitions
|----- classic
|----- html_includes
|----- classic
|----- images
|----- modules
|----- order_total
|----- classic
|----- payment
|----- classic
|----- shipping
|----- templates
|----- template_default
|----- buttons
|----- greek
Of the above files, I copied the red folders only into the /includes/languages folder of my site. The greek.php file starts as below (I have deleted the comment lines) and it looks fine in that it has the locale set to Greek, the correct d/m/y date format etc. I have also left the first few lines showing the Greek definitions:
<?php
/**
* @package languageDefines
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license [url]http://www.zen-cart.com/license/2_0.txt[/url] GNU Public License V2.0
* @version $Id: english.php 7440 2007-11-17 21:51:35Z drbyte $
*/
define('FOOTER_TEXT_BODY', 'Copyright © ' . date('Y') . ' <a href="' . zen_href_link(FILENAME_DEFAULT) . '" target="_blank">' . STORE_NAME . '</a>. Powered by <a href="http://www.zen-cart.com" target="_blank">Zen Cart</a>');
@setlocale(LC_TIME,
'greek',
'el_GR',
'el_GR.iso_8859-7',
'el_GR.ISO_8859-7',
'el_GR.utf-8',
'el_GR.UTF-8'
);
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 (!function_exists('zen_date_raw')) {
function zen_date_raw($date, $reverse = false) {
if ($reverse) {
return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);
} else {
return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);
}
}
}
define('LANGUAGE_CURRENCY', 'Euro');
define('HTML_PARAMS','dir="ltr" lang="el"');
define('CHARSET', 'ISO-8859-7');
define('FOOTER_TEXT_REQUESTS_SINCE', 'αιτήσεις από');
define('TEXT_GV_NAME','Κουπόνι δώρου');
define('TEXT_GV_NAMES','Κουπόνια δώρου');
define('TEXT_GV_REDEEM','Κωδικό κουπονιού');
When I log in as administrator, I see a yellow warning bar on top with the message: "MISSING LANGUAGE FILES OR DIRECTORIES ... Greek Greek". I suppose that this is because I haven't transferred all the folders in the language pack, but I hesitate to do so until I know exactly which folders to transfer and where. I have to point out that the greek.php file in the folder has the locale set to en_US.ISO_8859-1, the date format to m/d/y and all definitions are in English, not in Greek. It starts like this:
<?php
/**
* @package admin
* @copyright Copyright 2003-2007 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: english.php 7440 2007-11-17 21:51:35Z drbyte $
*/
define('HEADER_ALT_TEXT', 'Admin Powered by Zen Cart :: The Art of E-Commerce');
define('HEADER_LOGO_WIDTH', '200px');
define('HEADER_LOGO_HEIGHT', '70px');
define('HEADER_LOGO_IMAGE', 'logo.gif');
setlocale(LC_TIME, 'en_US.ISO_8859-1');
define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime()
define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()
define('DATE_FORMAT', 'm/d/Y'); // this is used for date()
define('PHP_DATE_TIME_FORMAT', 'm/d/Y H:i:s'); // this is used for date()
define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');
define('DATE_FORMAT_SPIFFYCAL', 'MM/dd/yyyy'); //Use only 'dd', 'MM' and 'yyyy' here in any order
function zen_date_raw($date, $reverse = false) {
if ($reverse) {
return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);
} else {
return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);
}
}
if (file_exists(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/' . $template_dir . '/meta_tags.php')) {
$template_dir_select = $template_dir . '/';
} else {
$template_dir_select = '';
}
require(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/' . $template_dir_select . 'meta_tags.php');
//die(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/' . $template_dir_select . 'meta_tags.php');
define('ICON_METATAGS_ON', 'Meta Tags Defined');
define('ICON_METATAGS_OFF', 'Meta Tags Undefined');
define('TEXT_LEGEND_META_TAGS', 'Meta Tags Defined:');
define('TEXT_INFO_META_TAGS_USAGE', '<strong>NOTE:</strong> The Site/Tagline is your defined definition for your site in the meta_tags.php file.');
define('HTML_PARAMS','dir="ltr" lang="en"');
define('CHARSET', 'iso-8859-1');
define('HEADER_TITLE_TOP', 'Admin Home');
define('HEADER_TITLE_SUPPORT_SITE', 'Support Site');
define('HEADER_TITLE_ONLINE_CATALOG', 'Online Catalog');
define('HEADER_TITLE_VERSION', 'Version');
define('HEADER_TITLE_LOGOFF', 'Logoff');
define('TEXT_GV_NAME','Gift Certificate');
define('TEXT_GV_NAMES','Gift Certificates');
define('TEXT_DISCOUNT_COUPON', 'Discount Coupon');
define('TEXT_GV_REDEEM','Redemption Code');
I'm not sure why it's called greek.php when it is in English. If the logic behind the package is that the administration is in English and the front end in Greek, that's fine, because I prefer it this way. However, the contradicting locale settings might be responsible for the next issue (or not):
When I enter a category name or a product in Greek, the editor accepts input in Greek. When the category or product is saved and I enter to edit it again, all Greek characters have been replaced with their codes in the form, for example, & # 9 4 7 ; & # 9 4 8 ; & # 9 6 6 ; & # 9 4 7 ; & # 9 4 8 ; & # 9 6 6 ; & # 9 4 7 ; etc (sorry, I had to enter spaces because they were showing as Greek characters in preview). I suppose that the title and description fields have a maximum length limit. As a result, a category named "Βιβλία" appears as "Βιβλί&#" because the browser converts the codes of the first 5 characters to Greek and then lists &# (which are the string's last characters) as literal characters because it can't convert them. The same happens with the product name "Όνομα προϊόντος" which is rendered as "Όνομα προϊό" because the string exceeds the maximum length and is truncated. The product description seems correct but I'm sure that the same will happen if it's quite long.
All these indicate to me that the category and product editor work in ISO-8859-1 instead of utf-8 and this is where I need some help from expert users or developers in the forum. I know that it's a question of proper configuration of encoding because there are stores set up with Zen Cart which display perfectly.
I attach a few screenshots to show the wrong display and hope that someone will be able to provide a simple to understand magic solution. Until then, I shall remain despaired :wacko:
Thanks in advance for any assistance which will be much appreciated and greetings from Athens together with my apologies for this very long post.
George
Athens Collectibles