language link with picture

tiux

No avatar

2008-10-21 20:08

Hello.

Is it possible to add different language link with picture?

For example i would like to add 3 language link to footer but not only text but with pictures.

Thank you!

» Quick.Cart v3.x

treewood (OpenSolution)

Avatar: treewood

2008-10-22 07:55

Yes it is possible. Read this:
http://opensolution.org/Quick.Cart/docs/?id=instruction#languages_management

And change this:
<a href="?sLang=pl">polski</a>
<a href="?sLang=en">english</a>
to:
<a href="?sLang=pl">PUT HERE IMAGE CODEi</a>
<a href="?sLang=en">PUT HERE IMAGE CODE</a>

tiux

No avatar

2008-10-22 20:03

Big thanks!

liannetijmes

Avatar: liannetijmes

2009-04-05 20:34

Sorry, i don't understand in which file and where in that file you have te place that code!

Quick.cms

thanks!

ktomov

No avatar

2009-04-05 21:32

templates/container.tpl
You can place it wherever you like. Mine is under $sMenu1

pete007

No avatar

2009-09-30 13:28

Works great as Ktomov said

<a href="?sLang=en"><img src="templates/img/en.gif"></a>

3dfx

No avatar

2009-12-18 12:06

Sorry for bringing this old topic up, but my question is related to it:

Is it possible to retain the "?sLang=en" string on all English URLs to enable better indexing?

Thank you!

cgan

Avatar: cgan

2009-12-18 15:13

Try this: Check in "Admin/Settings/Option". There you'll find "Language parameter in URL"
Change it to "Yes".

cgan

beholder

Avatar: beholder

2009-12-18 18:06

Yes Cgan, that is, in the new versions of QC. 3dfx, I suggest an upgrade to 3.4. Or we have to do it the hard way.

3dfx

No avatar

2009-12-18 23:32

Thank you very much for your reply!
Unfortunately I really don't want to mess with the site any more - at last everything is up and running smoothly... Is the "hard" way really hard?

beholder

Avatar: beholder

2009-12-19 19:34

This solution is part of my checkUpdate mod, but since there is now language parameter enabled in the newer versions of QC, I am releasing it now as a free solution:

1. Change code:
$aData[sLinkName]
to:
$aData[sLinkName]&amp;sLang=$config[language]
in following template files:
templates/menu2.tpl (block LIST)
templates/menu3.tpl (block LIST)
templates/menu4.tpl (block LIST)
templates/menu_X.tpl (only if you use EasyNavigation plugin, edit block LIST)
templates/orders_basket.tpl (block BASKET_LIST)
templates/orders_form.tpl (block ORDER_PRODUCTS_LIST)
templates/pages_default.tpl (blocks SUBPAGES_LIST_1, SUBPAGES_LIST_2, PRODUCTS_LIST, PRODUCTS_IMAGE)
if using plugin RandomProduct also templates/container.tpl (block RANDOM_PRODUCT)
and perhaps also in templates for emails to admin and customer


2. modify this line in core/pages.php:
$this->mData[] = '<a href="'.$this->aPages[$this->aPagesParents[$iPage]]['sLinkName'].'">'.$this->aPage s[$this->aPagesParents[$iPage]]['sName'].'</a>';
to this:
$this->mData[] = '<a href="'.$this->aPages[$this->aPagesParents[$iPage]]['sLinkName'].'&amp;sLang='.$GLOBALS[' config']['language'].'">'.$this->aPages[$this->aPagesParents[$iPage]]['sName'].'</a>';

3. modify this line in core/products.php:
$sTree .= '<a href="'.$oPage->aPages[$iPage]['sLinkName'].'">'.$oPage->aPages[$iPage]['sName'].'< ;/a>';
to this:
$sTree .= '<a href="'.$oPage->aPages[$iPage]['sLinkName'].'&amp;sLang='.$GLOBALS['config']['language'].'" >'.$oPage->aPages[$iPage]['sName'].'</a>';

beholder

Avatar: beholder

2009-12-19 19:35


1. Change code

$aData[sLinkName]
to:
$aData[sLinkName]&amp;sLang=$config[language]
in following template files
templates/menu2.tpl (block LIST)
templates/menu3.tpl (block LIST)
templates/menu4.tpl (block LIST)
templates/menu_X.tpl (only if you use EasyNavigation pluginedit block LIST)
templates/orders_basket.tpl (block BASKET_LIST)
templates/orders_form.tpl (block ORDER_PRODUCTS_LIST)
templates/pages_default.tpl (blocks SUBPAGES_LIST_1SUBPAGES_LIST_2PRODUCTS_LISTPRODUCTS_IMAGE)
if 
using plugin RandomProduct also templates/container.tpl (block RANDOM_PRODUCT)
and 
perhaps also in templates for emails to admin and customer


2. modify this line in core
/pages.php:
      
$this->mData[] = '<a href="'.$this->aPages[$this->aPagesParents[$iPage]]['sLinkName'].'">'.$this->aPage s[$this->aPagesParents[$iPage]]['sName'].'</a>';
to this:
      
$this->mData[] = '<a href="'.$this->aPages[$this->aPagesParents[$iPage]]['sLinkName'].'&amp;sLang='.$GLOBALS[' config']['language'].'">'.$this->aPages[$this->aPagesParents[$iPage]]['sName'].'</a>';<b r />

3. modify this line in core/products.php:
          
$sTree .= '<a href="'.$oPage->aPages[$iPage]['sLinkName'].'">'.$oPage->aPages[$iPage]['sName'].'&lt ;/a>';
to this:
          
$sTree .= '<a href="'.$oPage->aPages[$iPage]['sLinkName'].'&amp;sLang='.$GLOBALS['config']['language'].'" >'.$oPage->aPages[$iPage]['sName'].'</a>';

beholder

Avatar: beholder

2009-12-19 19:39

weird, forum fucks up my code, but it the upper code should be more readable than the one added later. Just remove the unnecessary ; in the first code line of the step #3.

3dfx

No avatar

2009-12-22 07:48

Once again - thank you a lot - I'll try this today and share the results :)

3dfx

No avatar

2009-12-22 10:15

OK - everything seems to work perfect - I only replaced

&amp;

with

?

everywhere in the code. 10x!

beholder

Avatar: beholder

2009-12-24 15:02

you probably meant with &
but ok

embaka

No avatar

2010-02-01 15:55

Hello,
I want to add 3rd language, but not only in the user area, but also in administration. I created db files needed in their language, but it went into administration and then change my write this:

Fatal error: Call to undefined function de_pages() in D:\xampp\htdocs\mag\mag\core\pages.php on line 299

version is 3.5. tell me how to fix it

embaka

No avatar

2010-02-01 16:13

indeed in part as a user adds another language shows the same
Fatal error: Call to undefined function de_pages () in D: \ xampp \ htdocs \ mag \ mag \ core \ pages.php on line 299

Back to top
about us | contact