Change Image on click

Popular automatic website translation tool

Re: Change Image on click

Postby Edvard » Thu Mar 24, 2011 2:41 pm

If you are using the free version you can modify the javascript doTranslate funciton to change also the header image. It is very specific to your template, so cannot tell the details.
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4184
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Change Image on click

Postby vitomav » Fri Mar 25, 2011 12:52 am

Ummmmmmm

How would you do it for you site's header??????

what code would u use?
vitomav
 
Posts: 2
Joined: Thu Mar 24, 2011 7:31 am

Re: Change Image on click

Postby Edvard » Fri Mar 25, 2011 1:12 pm

You can add some id to your header image tag:

Code: Select all
<img id="header_image" src="header.png" />


Then inside doTranslate
Code: Select all
document.getElementById('header_image').src = "http://yourdomain.com/header_"+lang+".png";


So it will change the header.png to header_lang.png, if your lang = ru it will be header_ru.png
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4184
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux