Zen-Cart Japanese/English Pull Downs


This tutorial will show you how to add pull down lists for Japanese prefectures.  This is a more advanced tutorial, but if you fallow it and do backups of your files/database before hand, there should be no problem.

What we are going to do is upload the zones to the database in English and Japanese. Then we will change the output of the zones based on the language of the cart.

Pleas have your test site ready with the Japanese Pack installed.

If you have not yet installed your Japanese Pack, start here:


UTF-8 Zen-Cart

Zen-Cart 1.3.8 Japanese Pack Install

If you have all that, then we are ready to go.  Download one of the attachment below and move onto the next step.

Updates


Changes to the " Final Two Files" page, 4.06.08
Changes to the "Japanese Zones in English" page 7.10.08

AttachmentSize
CKD-Multi-lingual-PullDowns1.0.7z2.47 KB
CKD-Multi-lingual-PullDowns1.0.rar7.36 KB
CKD-Multi-lingual-PullDowns1.0.zip9.45 KB

Comments

About Zip file

Hello, it's Dice-K I am big fun of your contribution, btw, I could not unzip CKD-Multi-lingual-PullDowns1.0.zip If you have spare time, could you check zip file? Thanks

Zip File

Hi Dice-K,

I just checked the zip file and it works fine.  Do a right click and save as.  What do you use to unpack it?  I use winrar for most my stuff.  7-zip would work too.

Let me know if you have more problems,

Regards,

Shaun

Found Solution!

Hi Shaun, thanks for the reply! I am mac user, and I use Mac OS X Leopard. Just now, I tried unzip your file again, but some error came up and say "Unable to unarchive file (Error 1 - Operation not permitted)" so I went to another computer which has windows xp pro, and tried unzip same file and i could unzip file. very strange. anyway, Thanks for this great contribution! Dice-K

Thanks for the input, the

Thanks for the input, the next time I get near a Mac, I will try to remember to zip some up and add them to my site.  If you would like to do it for me and send it to me that would be great.   You can send me your email through my contact page.  Don't post it here as bots will harvest it.

collation bug

First I want to say that the code seems to work like a charm...thanks for your hard work (your coffee on the way...). A couple things;

the download "zip" file for JP/EN Pull Downs was only able to unzip with 7zip...which is okay, but could confuse someone. I have both, so no problem;

I found I had to go into zones in phpmyadmin and manually change the collation for zone_code and zone_name to get the drop down Japanese characters to show (all other JP language in the store showed okay). For some reason the initial configure did not do the job . This is not the fault of your code, but if someone runs into an issue that the zones are not collating properly this was one place to look.

I am having a little trouble with the pull downs showing both languages in several fields, log in is okay, but I will go over all and am sure to catch the problem. I am customizing a new zen cart to replace our existing store and have found the whole program interesting, frustrating at times, but generally fairly easy to get installed (locally) and customized. The manual is invaluable...I have little web design or programming experience, so if I can do it.....Once I move from local to web based host will be the tell.

Hi Robert, Thanks for the

Hi Robert,

Thanks for the details.  For the zip file, I just tested it, with WinRAR, and it works fine.  Zzip is a good thing to use too, but I find WinRAR to do an over all better job when it comes to decompressing compressed folders.

As for the database thing, I will check this out, thanks for pointing this out.  Let me know if you have any problems more than this.  Also, if you are using PayPal, contact me.

Regards,

Shaun

Thank you for your hard

Thank you for your hard work. I have followed your instruction to copy from the source of sign-in page the javascript (i just copy the first part of the java script, i.e. the part including zones. is it right? I did this for English page and Japanese page) and pasted it to jscript_addr_pulldowns.php in create_account folder downloaded from link above. Then I edited Japanese zones for each part (EN part and JP part as you mentioned), and then copied that file to my zencart site (of course, I backuped first the old file which has the same name). The problem is, when I refresh my shop's page and go to sign-in page and select Japan, the zones in the pulldown menu are still in 2 languages, I mean, in English and in Japanese characters. Did I do something wrong? I haven't continue to the next step (the last 2 files). I don't think this make the problem, so I would appreciate it if you could give any advice.

My follow up for my comment

My follow up for my comment above. I found this page:
http://www.zen-cart.com/forum/showthread.php?t=93438&page=4
and did what pilow2 said, i.e to copy "jscript_addr_pulldowns.php" created in "/includes/modules/pages/create_account/" to 3 other folders:

../includes/modules/pages/checkout_payment_address/
../includes/modules/pages/login/
../includes/modules/pages/popup_shipping_estimator/

and it works! Japanese character in Japanese language mode, and alphabet in English language mode.

Thanks again.