Forums / General Questions / Understanding right way to install & publish multi lingual page

Understanding right way to install & publish multi lingual page

Locked

Views: 2,395

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
18 Dec 2008, 4:01 PM
#1
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Understanding right way to install & publish multi lingual page

Hi All

I urgently need help to understand what are the right methodology/steps to actually set up online shopping cart in 3 languages.

  1. Installing necessary files
    Which is the site I can download and install the languages files?
    Can I just use a English support zen cart first, then I add in the folders for Japanese and Chinese in the admin/include/language folder?
    What should be the right way to do

  2. Using step in 1) will I be able to see both Japanese, Chinese and English admin tools?
    If not, what are the right method to do?
    Or only one language admin tool is best enough?

  3. Let's say zencart is fully installed, is it true that after I make pages for English sites, to have a Japanese and Chinese sites, all I do is to recopy those php extension file from English language folder and then do all the editing in Japanese and Chinese folder?

Kindly help

Thanks

Jason
*i tried in language section & no one answer

18 Dec 2008, 5:57 PM
#2
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Understanding right way to install & publish multi lingual page

there are many language addon in free sotware add ons section that were translated by users ..

install your zencart in default language.
look for desired language in free addon section .
download and just move the folders and files to right location on your zen cart shop .

there are no need to copy php files if you wish to translate products description .
after installing your language packs. you should see additional htmlarea in your product section where you can just insert description of your products in description box represented with flag corresponding to the language.

it is important that you create Override for your zen cart . create new template .. new template can be the same classic template that is default to zencart.

some of those language files may need custom template override to work properly ..

if you installing zencart for languages such as chines or Japanese

please refer to tutorial under UTF 8 configuration .. default zencart maynot work properly with those languages.
The following link is for the tutorial

srw2d.com/content/utf-8-zen-cart

hope this helps

19 Dec 2008, 6:29 PM
#3
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Re: Understanding right way to install & publish multi lingual page

Hi Tony

Definitely your words help.
Actually I have install a default English version of zencart. I downloaded a Japanese zencart zip file as well. After unzipping, I upload the Japanese folder and all its related raw php file into the zencart site I have. It is together with the English folder.
After inserting the Japanese language option in the cart admin page, I still cant see the Japanese option in the online cart I tried.
Not sure what is wrong.
But since I got some info from your message, I will try again.

Just to recap about making a Japanese php file. So all I should do is just to translate certain English text into Japanese in the php files and nothing more to do.
As for how the admin page actually need override, I have not idea for now and let me try.

Any ideas I misunderstood, kindly enlighten

Thanks! Appreciate your kindness

Jason

19 Dec 2008, 7:47 PM
#4
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Understanding right way to install & publish multi lingual page

If your Japanese addon translated correctly , then you don't have to translate any php file.

Did you follow the utf 8 tutorial ???

19 Dec 2008, 8:16 PM
#6
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Re: Understanding right way to install & publish multi lingual page

Hi Tony

You're very helpful!
Yes you're right. The Japanese page displayed correctly even before I check the link you sent.
The problem now is that I totally cannot go into my cart admin now.
I cannot access the admin page when I keyed in the link and pressed enter in IE or firefox

The errors are as follows:
Warning: main(includes/languages/japanese.php) [function.main]: failed to open stream: No such file or directory in /home/www/myWEB.freehostia.com/catalog/admin/includes/init_includes/init_languages.php on line 31

Fatal error: main() [function.require]: Failed opening required 'includes/languages/japanese.php' (include_path='.:/usr/local/lib/php') in /home/www/myWEB.freehostia.com/catalog/admin/includes/init_includes/init_languages.php on line 31

I believe I need to update the link to japanese.php in init_language.php file. But how to do that?
Can you help , please?

Thanks a lot in advance!

Jason

19 Dec 2008, 8:19 PM
#7
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Re: Understanding right way to install & publish multi lingual page

Hi Tony

The code need to be added in line 31 in the following codes which is right after the phrase "TONY HELP ME!" which I purposely put it as a indicator for you to know line 31

<?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: init_languages.php 6027 2007-03-21 09:11:58Z drbyte $ */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } // set the language if (!$_SESSION['language'] || isset($_GET['language'])) { include(DIR_WS_CLASSES . 'language.php'); $lng = new language(); if (isset($_GET['language']) && zen_not_null($_GET['language'])) { $lng->set_language($_GET['language']); } else { $lng->get_browser_language(); $lng->set_language(DEFAULT_LANGUAGE); } $_SESSION['language'] = (zen_not_null($lng->language['directory']) ? $lng->language['directory'] : 'english'); $_SESSION['languages_id'] = (zen_not_null($lng->language['id']) ? $lng->language['id'] : 1); $_SESSION['languages_code'] = (zen_not_null($lng->language['code']) ? $lng->language['code'] : 'en'); } // include the language translations TONY HELP ME! require(DIR_WS_LANGUAGES . $_SESSION['language'] . '.php'); $current_page = basename($PHP_SELF); if (file_exists(DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . $current_page)) { include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . $current_page); } if ($za_dir = @dir(DIR_WS_LANGUAGES . $_SESSION['language'] . '/extra_definitions')) { while ($zv_file = $za_dir->read()) { if (strstr($zv_file, '.php')) { require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/extra_definitions/' . $zv_file); } } $za_dir->close(); } ?>

===========================================
Pls help

Jason

19 Dec 2008, 8:26 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Understanding right way to install & publish multi lingual page

myjasonlee:

The errors are as follows:
Warning: main(includes/languages/japanese.php) [function.main]: failed to open stream: No such file or directory in /home/www/myWEB.freehostia.com/catalog/admin/includes/init_includes/init_languages.php on line 31

You are reading the error message incorrectly.

init_languages is only REPORTING the error.

The ACTUAL error is: "... (includes/languages/japanese.php) [function.main]: failed to open stream: No such file or directory in ... /catalog/admin/ ... "

So, that means: You're missing the /admin/includes/languages/japanese.php file on your server.

DO NOT EDIT the init_languages file!!!

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Dec 2008, 8:48 PM
#9
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Re: Understanding right way to install & publish multi lingual page

Hi Sensei

Thanks for correcting me. I will follow your advice to look for the missing file.

Hi Tony,
Kindly do not spend time on the error code first.
Let me try Sensei's suggestion and I will report here the outcome.

Thanks all for the wonderful help in advance.

Cheers
Jason

20 Dec 2008, 1:33 AM
#10
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Re: Understanding right way to install & publish multi lingual page

Hi Sensei & Tony

I did the correction to put in the japanese.php missing file.
And good news is I can see the log in page as a Administrator.Before this action was done, I have the line31 error as mentioned

I log in and it shows the below blank page with
"The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings. "

I purposely tested with wrong log in name/password. The page did respond correctly showing username & password dont match.

So it is indeed true that the intended page cant be loaded.
Could you advise what has gone wrong?
All the Japanese and English php & their corresponding folders are present both in admin and the non-admin language directories

I also followed the instruction on srw2d.com/content/utf-8-zen-cart

Or any security setting must be taken care ? What have I missed?

Kindly help

Jason

20 Dec 2008, 3:59 PM
#11
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Understanding right way to install & publish multi lingual page

if you getting blankpage or partial blank pages. please follow the following tutorial..

https://www.zen-cart.com/tutorials/index.php?article=82

you can also install debug utility made available to debug zencart .link is available in same tutorial.

21 Dec 2008, 3:48 AM
#12
myjasonlee avatar

myjasonlee

New Zenner

Join Date:
Dec 2008
Posts:
19
Plugin Contributions:
0

Re: Understanding right way to install & publish multi lingual page

Thanks Tony

Allow me to try and seek for your advice again.

Good weekend to all especially those who is helping out a green horn like me.

Thank you!

Jason

8 May 2009, 2:12 AM
#13
caroleas avatar

caroleas

Totally Zenned

Join Date:
Feb 2009
Posts:
896
Plugin Contributions:
0

Re: Understanding right way to install & publish multi lingual page

tony_sar:

install your zencart in default language.
look for desired language in free addon section .
download and just move the folders and files to right location on your zen cart shop .

Could you explain what is the RIGHT location on the zen?
I downloaded the French language pack and the instructions in there do not tell me which folder to put the files in. Do i simply make a folder called "French" as there is one called "English"?

8 May 2009, 10:46 AM
#14
caroleas avatar

caroleas

Totally Zenned

Join Date:
Feb 2009
Posts:
896
Plugin Contributions:
0

Re: Understanding right way to install & publish multi lingual page

I did make a "french" folder just beside the "english" one and put all the other folders (classic, extra_definition, html_includes, images and modules) in there.

I updated in the admin panel Localization - Languages, and added a new language, filling in the fields. Now i see the icon showing up in that page (meaning that zen is finding the correct file at the correct location).

However, i still have the "MISSING LANGUAGE FILES OR DIRECTORIES ... French Français" message in the yellow bar up top. So, WHICH files or folders should be placed somewhere else?

Also, when it DOES work, where on the main page will i see the flag icons appear? Do i have to edit the stylesheet to see it?