Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / zen_image ADD LANGUAGE SESSION

zen_image ADD LANGUAGE SESSION

Locked

Views: 1,212

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
17 Nov 2008, 12:18 PM
#1
xhidex avatar

xhidex

New Zenner

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

zen_image ADD LANGUAGE SESSION

Hello to all,

I have a theme to modify...
In the header, the theme load some images (button) where it's write: New Products, Special offers etc....
The link to this button are like this:

<a href="<?=zen_href_link(FILENAME_SPECIALS)?>"><?=zen_image(DIR_WS_TEMPLATE.'images/l2.gif')?></a>

So, I have prepared some images with translated text in other languages which I use in the website (german and italian)...
How can I make it work to load from the corrispective button/italian or button/german?
So, I think the function should look which language are currently display and load the buttons from the right folder...
Sorry but I'm not php expert!
Thx u a lot

17 Nov 2008, 2:33 PM
#2
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: zen_image ADD LANGUAGE SESSION

xhidex:

Hello to all,

I have a theme to modify...
In the header, the theme load some images (button) where it's write: New Products, Special offers etc....
The link to this button are like this:

<a href="<?=zen_href_link(FILENAME_SPECIALS)?>"><?=zen_image(DIR_WS_TEMPLATE.'images/l2.gif')?></a>

So, I have prepared some images with translated text in other languages which I use in the website (german and italian)...
How can I make it work to load from the corrispective button/italian or button/german?
So, I think the function should look which language are currently display and load the buttons from the right folder...
Sorry but I'm not php expert!
Thx u a lot

You should be able to make this work by defining your "buttons" as buttons in includes/languages/english/YOUR_TEMPLATE/button_names.php

place newly created "buttons" in the appropriate button directory
includes/templates/YOUR_TEMPLATE/buttons/english
includes/templates/YOUR_TEMPLATE/buttons/german
includes/templates/YOUR_TEMPLATE/buttons/italian

then use the following code to call them

<?php echo '<a href="' . zen_href_link(FILENAME_SPECIALS) .'">' . zen_image_button(BUTTON_IMAGE_LINK, BUTTON_LINK_ALT) . '</a>'
18 Nov 2008, 12:15 PM
#3
xhidex avatar

xhidex

New Zenner

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

Re: zen_image ADD LANGUAGE SESSION

you man are great! thank you very much for your great support!

18 Nov 2008, 1:51 PM
#4
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: zen_image ADD LANGUAGE SESSION

Glad I could help