X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   show image by language (https://forum.x-cart.com/showthread.php?t=20598)

kenwood 03-18-2006 08:30 AM

show image by language
 
how can i change an image on frontpage or in menue based on different languages?

simitpatel 04-06-2006 04:52 AM

you can use if statements around the code for the image. for example:

{if $store_language eq "US"}
[img]image1.gif[/img]
{/if}

{if $store_language eq "JP"}
[img]image2.gif[/img]
{/if}

kenwood 04-24-2006 02:28 AM

thanx

just_me 06-21-2006 02:31 PM

Great tweek
 
I have been looking for this tweek for the "save_money.gif" for some time. I now have got the product page completely multilingual (SP,FR,US). Thanks. :wink:

webtron 07-04-2006 01:17 PM

just_me and simitpatel,

In what file do you put that code?

And before and after what text exactly?

If you copy and paste how the code looks on the file it would be great.

Thanks!

just_me 07-05-2006 11:43 AM

making the neat save _money.gif be language compatible
 
Sure, I'd be happy to help. I put the code in here: /customer/main/product.tpl
Find
Code:

{if $active_modules.Feature_Comparison ne ""}
{include file="modules/Feature_Comparison/product_buttons.tpl"}
{/if}



</TD>
</TR></TABLE>
</TD>
<TD align="right" valign="top" width="60">
{if $product.taxed_price gt 0 and $product.list_price gt 0 and $product.taxed_price lt $product.list_price}<TABLE border="0" width="60"><TR>


Just below it you'll see the code we want to make language friendly:
Code:

<TD width="55" height="56" class="SaveMoneyLabel" background="{$ImagesDir}/save_money.gif" align="center" valign="middle">

We made duplicate save_money.gifs in the languages needed and uploaded them to the xcart image file. It's the same file where the original save_money.gif is also located. Then we replaced the standard code with this new code repeating it for our three languages:

Code:

{if $store_language eq "US"}
<TD width="55" height="56" class="SaveMoneyLabel" background="{$ImagesDir}/save_money.gif" align="center" valign="middle">{/if}
{if $store_language eq "AR"}
<TD width="55" height="56" class="SaveMoneyLabel" background="{$ImagesDir}/save_money_es.gif" align="center" valign="middle">{/if}
{if $store_language eq "FR"}
<TD width="55" height="56" class="SaveMoneyLabel" background="{$ImagesDir}/save_money_fr.gif" align="center" valign="middle">{/if}


webtron 07-06-2006 07:14 AM

Just_me,

You're awsome! Thanks!


All times are GMT -8. The time now is 08:54 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.