Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2009
    Posts
    8
    Plugin Contributions
    0

    Default Japanese language support?

    I'm looking at setting up an e-commerce with using Lunarpages as my hosting solution and ZenCart as my chopping cart solution. My clients will mostly be Japanese and before I sign up with the hosting company I need to make sure that ZenCart supports the following:

    1- Japanese text input
    2- Displaying the cart UI and any messages in Japanese
    3- Users can select to have the cart in a language other than Japanese

    The Hosting provider thinks ZenCart can do all of the above but can't give me a 100% guarantee.

    From what I've read on the documentation Wiki it looks like there is no Japanese language pack since I see Japanese in the 'Translation Wanted' section but I would like someone with first-hand knowledge to confirm this for me :)

    If a translation is needed, how much work is this? I may be willing to do it. Then again I see there is a Japan in the International support section and if they haven't done the translation it's probably because it's not that simple or easy?


    Thanks in advance!

  2. #2
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Japanese language support?

    srw2d.com/content/zen-cart-138-japanese-pack-install

    Here you go

    If you want to automate the process to change tables to utf8, you can use the script below (please back up your db first)

    Create a file named utf8.php at the root of the cart, then place the code in

    PHP Code:
    <?php
    /* utf8 convert by yellow1912*/

    require('includes/configure.php');

    $db->Execute("ALTER DATABASE `".DB_DATABASE."` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci");

    $username DB_SERVER_USERNAME;
    $password DB_SERVER_PASSWORD;
    $db DB_DATABASE;
    $host DB_SERVER;

    function 
    MysqlError()
    {
            if (
    mysql_errno())
            {
                    echo 
    "<b>Mysql Error: " mysql_error() . "</b>\n";
            }
    }

    $target_charset "utf8";
    $target_collate "utf8_general_ci";

    echo 
    "<pre>";

    $conn mysql_connect($host$username$password);
    mysql_select_db($db$conn);

    $tabs = array();
    $res mysql_query("SHOW TABLES");
    MysqlError();
    while ((
    $row mysql_fetch_row($res)) != null)
    {
            
    $tabs[] = $row[0];
    }

    // now, fix tables
    foreach ($tabs as $tab)
    {
            
    $res mysql_query("show index from {$tab}");
            
    MysqlError();
            
    $indicies = array();

            while ((
    $row mysql_fetch_array($res)) != null)
            {
                    if (
    $row[2] != "PRIMARY")
                    {
                            
    $indicies[] = array("name" => $row[2], "unique" => !($row[1] == "1"), "col" => $row[4]);
                            
    mysql_query("ALTER TABLE {$tab} DROP INDEX {$row[2]}");
                            
    MysqlError();
                            echo 
    "Dropped index {$row[2]}. Unique: {$row[1]}\n";
                    }
            }

            
    $res mysql_query("DESCRIBE {$tab}");
            
    MysqlError();
            while ((
    $row mysql_fetch_array($res)) != null)
            {
                    
    $name $row[0];
                    
    $type $row[1];
                    
    $set false;
                    if (
    preg_match("/^varchar\((\d+)\)$/i"$type$mat))
                    {
                            
    $size $mat[1];
                            
    mysql_query("ALTER TABLE {$tab} MODIFY {$name} VARBINARY({$size})");
                            
    MysqlError();
                            
    mysql_query("ALTER TABLE {$tab} MODIFY {$name} VARCHAR({$size}) CHARACTER SET {$target_charset}");
                            
    MysqlError();
                            
    $set true;

                            echo 
    "Altered field {$name} on {$tab} from type {$type}\n";
                    }
                    else if (!
    strcasecmp($type"CHAR"))
                    {
                            
    mysql_query("ALTER TABLE {$tab} MODIFY {$name} BINARY(1)");
                            
    MysqlError();
                            
    mysql_query("ALTER TABLE {$tab} MODIFY {$name} VARCHAR(1) CHARACTER SET {$target_charset}");
                            
    MysqlError();
                            
    $set true;

                            echo 
    "Altered field {$name} on {$tab} from type {$type}\n";
                    }
                    else if (!
    strcasecmp($type"TINYTEXT"))
                    {
                            
    mysql_query("ALTER TABLE {$tab} MODIFY {$name} TINYBLOB");
                            
    MysqlError();
                            
    mysql_query("ALTER TABLE {$tab} MODIFY {$name} TINYTEXT CHARACTER SET {$target_charset}");
                            
    MysqlError();
                            
    $set true;

                            echo 
    "Altered field {$name} on {$tab} from type {$type}\n";
                    }
                    else if (!
    strcasecmp($type"MEDIUMTEXT"))
                    {
                            
    mysql_query("ALTER TABLE {$tab} MODIFY {$name} MEDIUMBLOB");
                            
    MysqlError();
                            
    mysql_query("ALTER TABLE {$tab} MODIFY {$name} MEDIUMTEXT CHARACTER SET {$target_charset}");
                            
    MysqlError();
                            
    $set true;

                            echo 
    "Altered field {$name} on {$tab} from type {$type}\n";
                    }
                    else if (!
    strcasecmp($type"LONGTEXT"))
                    {
                            
    mysql_query("ALTER TABLE {$tab} MODIFY {$name} LONGBLOB");
                            
    MysqlError();
                            
    mysql_query("ALTER TABLE {$tab} MODIFY {$name} LONGTEXT CHARACTER SET {$target_charset}");
                            
    MysqlError();
                            
    $set true;

                            echo 
    "Altered field {$name} on {$tab} from type {$type}\n";
                    }
                    else if (!
    strcasecmp($type"TEXT"))
                    {
                            
    mysql_query("ALTER TABLE {$tab} MODIFY {$name} BLOB");
                            
    MysqlError();
                            
    mysql_query("ALTER TABLE {$tab} MODIFY {$name} TEXT CHARACTER SET {$target_charset}");
                            
    MysqlError();
                            
    $set true;

                            echo 
    "Altered field {$name} on {$tab} from type {$type}\n";
                    }

                    if (
    $set)
                            
    mysql_query("ALTER TABLE {$tab} MODIFY {$name} COLLATE {$target_collate}");
            }

            
    // re-build indicies..
            
    foreach ($indicies as $index)
            {
                    if (
    $index["unique"])
                    {
                            
    mysql_query("CREATE UNIQUE INDEX {$index["name"]} ON {$tab} ({$index["col"]})");
                            
    MysqlError();
                    }
                    else
                    {
                            
    mysql_query("CREATE INDEX {$index["name"]} ON {$tab} ({$index["col"]})");
                            
    MysqlError();
                    }

                    echo 
    "Created index {$index["name"]} on {$tab}. Unique: {$index["unique"]}\n";
            }

            
    // set default collate
            
    mysql_query("ALTER TABLE {$tab}  DEFAULT CHARACTER SET {$target_charset} COLLATE {$target_collate}");
    }

    // set database charset
    mysql_query("ALTER DATABASE {$db} DEFAULT CHARACTER SET {$target_charset} COLLATE {$target_collate}");

    mysql_close($conn);
    echo 
    "</pre>";
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  3. #3
    Join Date
    Nov 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: Japanese language support?

    Wow! Thank you so much for contributing this back to the community!

    I'm new to the whole shopping cart thing so just want to confirm, using your language pack will simply give the user the possibility of switching the cart display to Japanese correct?

    I'm envisioning my site to be bilingual (English/Japanese) and want to make sure that the cart solution I go with will allow me to easily, and dynamically changed the cart's language using the user's preferences.

    Thanks!

  4. #4
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Japanese language support?

    Quote Originally Posted by totsubo View Post
    Wow! Thank you so much for contributing this back to the community!

    I'm new to the whole shopping cart thing so just want to confirm, using your language pack will simply give the user the possibility of switching the cart display to Japanese correct?

    I'm envisioning my site to be bilingual (English/Japanese) and want to make sure that the cart solution I go with will allow me to easily, and dynamically changed the cart's language using the user's preferences.

    Thanks!
    Yup, you can read more info on crystal koi's page posted above. He can also speak Japanese I believe, which may help.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  5. #5
    Join Date
    Nov 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: Japanese language support?

    I've download Krystal Koi's language pack and read is installation instructions. I'm new to this and the instructions don't say _where_ to put the language pack.

    Should I put the whole thing in my CUSTOM template folder?

    Thanks!

  6. #6
    Join Date
    Mar 2005
    Posts
    555
    Plugin Contributions
    4

    Default Re: Japanese language support?

    @totsubo
    http://www.zen-cart.com/wiki/index.php/Languages

    @yellow1912
    Thanks very much for your script, its just what most need.
    Presuming your code is missing a ?> from the end. I tried it and received an error

    Fatal error: Call to a member function on a non-object in /home/var/public_html/utf8.php on line 6

    Line 6:
    Code:
    $db->Execute("ALTER DATABASE `".DB_DATABASE."` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci");
    My humble contributions....
    Info at a Glance Admin, Alternative Header & Improved Whos Online + Currently working on the next!
    If you have to think..... your obviously looking at the admin :)

  7. #7
    Join Date
    Mar 2005
    Posts
    555
    Plugin Contributions
    4

    Default Re: Japanese language support?

    @yellow1912
    Ignore my dribbel above, for some reason the site was running in php4 .
    But I now get

    Fatal error: Call to a member function Execute() on a non-object in /home/ukcarp/public_html/utf8.php on line 6
    My humble contributions....
    Info at a Glance Admin, Alternative Header & Improved Whos Online + Currently working on the next!
    If you have to think..... your obviously looking at the admin :)

  8. #8
    Join Date
    Mar 2005
    Posts
    555
    Plugin Contributions
    4

    Default Re: Japanese language support?

    Remind me to think for 2 seconds before posting next time.

    Add
    require('includes/application_top.php');

    And it all works like magic
    My humble contributions....
    Info at a Glance Admin, Alternative Header & Improved Whos Online + Currently working on the next!
    If you have to think..... your obviously looking at the admin :)

  9. #9

    Default Re: Japanese language support?

    Quote Originally Posted by totsubo View Post
    I need to make sure that ZenCart supports the following:

    1- Japanese text input
    2- Displaying the cart UI and any messages in Japanese
    3- Users can select to have the cart in a language other than Japanese
    I used the Japanese language pack from Crystal Koi and it works perfectly. I disabled EN on my cart, but you can include icons to allow customers to switch to their language of choice.

    Admin may also be switched between languages.

    I'm very happy with the package, it allowed us to create a successful store within the Japanese market.

    You will want to contact Crystal Koi about the payment module you decide on. There are a couple tweaks that may need to be done to make it work better. He can take care of those easily for a fair price.
    You can't wait for inspiration. You have to go after it with a club.
    "Jack London"

  10. #10
    Join Date
    Nov 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: Japanese language support?

    Thanks for the reply. I've decided to go with Drupal and Ubercart instead of Zen. I guess I should unsubscribe myself from this thread :)

 

 

Similar Threads

  1. Japanese Language support?
    By tim8w in forum Addon Language Packs
    Replies: 1
    Last Post: 11 Oct 2010, 10:48 AM
  2. Japanese language addon?
    By Mrchristoh in forum Addon Language Packs
    Replies: 1
    Last Post: 16 Jun 2009, 12:06 AM
  3. Replies: 1
    Last Post: 2 Jan 2009, 12:23 AM
  4. japanese language pack...
    By fish_who in forum Addon Language Packs
    Replies: 1
    Last Post: 10 Aug 2006, 04:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR