Forums / Addon Language Packs / Greek & English language site

Greek & English language site

Locked

Views: 5,560

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
18 Oct 2008, 4:52 PM
#1
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Greek & English language site

I am trying to setup a dual-language zen cart site (Greek default language and English). Initially, this will be a test site on my local pc (windows xp with WAMP server and zen cart version 1.3.7.1) and finally I will transfer it to a commercial web server.
The product attributes will be presented in these two languages (e.g. product name, description, and other attributes) as well as the front end of the site.

Will there be two separate databases or one with additional fields to accommodate for the language versions of the product attributes?

I guess, if there is one database, the language pack or some add on should provide for the additional fields (e.g. the english/greek versions of a product description, when the visitor selects the Greek site, the greek version of attributes-field is output, and accordingly for the english version).

I have read many posts related to language packs but I also have read that mysql database collation plays a role in the correct character storage.

After all this reading I am a little bit confused as to what should I do. From what I have understood, first I need to change the collation of the database to either utf8 (which kind of utf8 ?, utf8_bin or utf8_unicode_ci ?) or greek_general_ci.
Which exactly collation do I use for Greek and which for English?

Then, I guess I will have to install a greek language pack (the one from krom) or just a utf8 pack ? In other words, does the utf8 pack take care both of the English and Greek versions?

How will the administrator fill the store with new products, in both languages ?
I understand that my questions are many but they are all related together....

I appreciate your help
Vasilis

18 Oct 2008, 5:03 PM
#2
manton avatar

manton

New Zenner

Join Date:
Sep 2008
Location:
Athens
Posts:
32
Plugin Contributions:
0

Re: Greek & English language site

I had great problems with the greek language because it was stored both at the database and in php files as question marks.
I followed the steps described here and it worked for me.

Note that I am not using utf-8 but greek_general_ci

As far as storing categories and products is concerned, don't worry, you will find out that zen-cart, when inserting products, requires details for every language you have installed ;)

19 Oct 2008, 8:57 AM
#3
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: Greek & English language site

I am very happy to hear that...(about zen cart asking me to fill in the fields for the additional language packs, so only one database is used, as it should be).
Does greek_general_ci take care of English characters as well (in case a product has english characters in its attributes) ?

Now, another question: in case that one has already setup a store and needs to change the collation, if he does that, the default new collation is applied to the newly created tables or columns. Is there a way to change the collation and apply the new one to the already created database tables and columns (I dont mind about the data, I haven't inserted many).... In other words is there a way to avoid re-installing the store from the beginning ?

19 Oct 2008, 3:13 PM
#4
manton avatar

manton

New Zenner

Join Date:
Sep 2008
Location:
Athens
Posts:
32
Plugin Contributions:
0

Re: Greek & English language site

My attempt to change the collation on the installed database failed and I had to create a new one.

Yes, it applies to the English (latin) characters as well, but I suggest that as soon as you setup the database, you should do some testing in both languages to verify that it is working fine.

20 Oct 2008, 10:40 AM
#5
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: Greek & English language site

Have you tried the Greek language pack (krom) with zen cart version 1.3.8 ? Does it work? For example, if I want to use some add-ons like bar code functionality, which I think is for version 1.3.8, can I use also the greek language pack for this version ?

21 Oct 2008, 1:54 PM
#6
manton avatar

manton

New Zenner

Join Date:
Sep 2008
Location:
Athens
Posts:
32
Plugin Contributions:
0

Re: Greek & English language site

I am not aware of the add on you mention but in some others I tested I didn't face any problem, except that some greek php pages are not fully or not at all translated.

24 Oct 2008, 8:01 PM
#7
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: Greek & English language site

I have setup zen cart 1.3.7.1, and have used the netstudio greek language pack for an English/Greek e-commerce site. I have used utf8_general_ci collation in the mysql database (local test site in Win XP sp3, with wamp server), and also have set the charset to utf8 in the code of the greek.php file. I decided to use utf-8 collation and not greek_general_ci because I might add a 3rd language in the future so I would like it to be supported.

I modified the corresponding lines in greek.php file of both the /includes and the /admin directories to (front-end and admin section):

@setlocale(LC_TIME, 'en_US.utf8');

and

define('CHARSET', 'utf-8');

Also I have modified the query_factory.php file in order to set the queries to utf8 ```
mysql_query('SET NAMES "utf8"', $this->link);


I also added the greek language through the admin panel of zen cart. 

When I run the cart, the pages are **utf8 encoded** (as I expected), in both the english and greek languages, but when I switch to the greek language,  I get correct greek characters concerning output from the database (e.g. product description in greek) but wrong encoding characters concerning the greek translated menus in the side bar of the front-end (e.g. Όλα τα προϊόντα ...', 'Προχωρημένη Αναζήτηση' etc). Instead, I get boxes and symbols. 

Now, when I switch he character encoding from the browser menu tto Greek-iso-8859-7, I get the greek data from the database wrong encoded (boxes and symbols), and the greek sidebar menu right (the reverse result).

I have gotten similar results by using the **zen cart greek language pack add-on** (for zen cart 1.3.7) (I did the same steps to utf8 encode the pages).

So, it seems that in each case, **half of the greek output is ok and half is wrong encoded, although the whole page is utf8 encoded**. 

1. The netstudio greek pack is made for zen cart 1.3 Could that be a cause for my problem, since I use version 1.3.7.1 ?
2. Do you think that I should use greek_general_ci collation in the mysql database ? 
3. If I did that, which pack should I use and which setting in the charset code of the greek.php file ?
4. If I used greek_general_ci collation, could that support a 3rd European language in the future ?
5. Also, is there a greek translation for the admin section yet ?

I really appreciate any help
25 Oct 2008, 6:47 AM
#8
manton avatar

manton

New Zenner

Join Date:
Sep 2008
Location:
Athens
Posts:
32
Plugin Contributions:
0

Re: Greek & English language site

vasilios:

@setlocale(LC_TIME, 'en_US.utf8');

Have you check if by setting en_us you still have the date displayed in Greek?
 
As far as I know, there is no greek translation for the admin section yet.

I think that you can turn the greek php files into 8859-7 since they are only used when you switch to greek language.
If this still doesn't work, try to use ('SET NAMES "greek"', $this->link); instead.
25 Oct 2008, 9:01 PM
#9
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: Greek & English language site

I guess if I switch to 8859-7 charset in the greek.php code (so it generates the corresponding charset encoded pages), I will have to change the database collation as well, or will utf8 collation support this as well? In case, I change it to greek_general_ci collation, I wonder if it will be able to support a 3rd European language. I guess, I could experiment...

26 Oct 2008, 2:38 PM
#10
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: Greek & English language site

Finally, I think I found the solution. I kept the utf8 charset encoding (along with the utf8 collation in the database, so more European languages can be supported in the future) and I also converted some critical php files from the /includes/languages/greek directory (that contain greek static text) to utf8 (I used Ultra Edit, >>Files>>Conversions>>ASCII to UTF8). The reason that some of the greek text didn't output correctly is that these files' encoding did not coincide with the charset encoding of the generated web pages (i.e. they were ascii or dos or unix encoded and the generated pages are utf8 encoded, so the character mappings were not correct). After I did these conversions, everything appeared correctrly in the pages. Now, I am going to insert some products in both languages and check that everything (both static and dynamic text) appears correctly.