Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Mouseovers in two languages - how?

Mouseovers in two languages - how?

Locked

Views: 1,098

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
3 Dec 2006, 3:58 PM
#1
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Mouseovers in two languages - how?

I have a two language store, English & Japanese.

I have a logo with some links in the logo that include mousevers. Currently I have English displaying for mouseovers on both the English and the Japanese sides, which is not so nice for my mostly Japanese audience...

The mouseover text is in the my_template01/common/tpl_header.php file.

Is it possible to have mouseovers in Japanese when in the Japanese side, and in English when in the English side? If so, how do I go about doing that?

Thanks in advance!

3 Dec 2006, 7:46 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Mouseovers in two languages - how?

Hi Peacefreak

Does this mean that you hardcoded the mouseover text into the tpl_header.php file. If so, you can define constants instead for the text and then create define statements for each constant in the includes/languages/english/header.php and includes/languages/japanese/header.php files.

3 Dec 2006, 11:54 PM
#3
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Mouseovers in two languages - how?

Hello Kuroi San,

Yes, I put the html directly in the tpl_header.php.

Anyway, I am not really adept at CSS, so I wonder if you could give me an example of the ‘constant’ I need to put in the tpl_header.php and the corresponding ‘statement‘ for the English header.php...

I don’t know if you would need it or not, but I am including the current code from the tpl_header.php as a sample...

Thanks in advance!
(PS. (Your question implies that I could have done the initial mouseovers another way, which is interesting. I wonder if I was following the conventional way, or is there a better way?)

<div id="logoWrapper"> <a href="http://store.globalpeace.jp" class="peace-logo" id="peace-logo1" title="Click here to return to the Global Peace Campaign Store Top Page" ></a> <a class="peace-logo" id="peace-logo2"></a> <a class="peace-logo" id="peace-logo3"></a> <a href="http://globalpeace.jp" class="peace-logo" id="peace-logo4" title="Click here to go to the Japanese Global Peace Campaign homepage" ></a>
4 Dec 2006, 12:41 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Mouseovers in two languages - how?

Buttin in on me mate kurio here:

in the header.php file ( you should currently have one for English and one for Japanese)) find this code:

// added defines for header alt and text
  define('HEADER_ALT_TEXT', 'Powered by Zen Cart :: The Art of E-Commerce');
  define('HEADER_SALES_TEXT', 'TagLine Here');
  define('HEADER_LOGO_WIDTH', '192px');
  define('HEADER_LOGO_HEIGHT', '64px');
  define('HEADER_LOGO_IMAGE', 'logo.gif');

Resort to the default tpl_header.php file as this is already a pre defined constant and change the text for each header.php to your text; for english it would be:

// added defines for header alt and text
  define('HEADER_ALT_TEXT', 'Click here to return to the Global Peace Campaign Store Top Page');
  define('HEADER_SALES_TEXT', 'TagLine Here');
  define('HEADER_LOGO_WIDTH', '192px');
  define('HEADER_LOGO_HEIGHT', '64px');
  define('HEADER_LOGO_IMAGE', 'logo.gif');

And it's comparable for Japanese in the header.php file for /languages/Japanese

4 Dec 2006, 3:23 PM
#5
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Mouseovers in two languages - how?

I am quite a way to go yet...

I found the code you mentioned but I am not sure how to edit it/add to it to fit my situation...

I guess that I first need to delete the logoWrapper code in tpl_header.php and then place that code, or rather the equivalent/suitable code in the header.php

I gave it a few shots, but I am actually messing around in the dark.. From what I can understand, I have to ‘make a definition’ for peace-logo1 in the wrapperheader for the E and the J header.php’s...

Comparing the standard code that is in header.php with the logoWrapper code does not give me any good clues... So I hope someone can help me along a little further, perhaps with an example that I could work from...

Thanks in advance...