mscat Posted May 11, 2010 Share Posted May 11, 2010 I am doing a PrestaShop that have images with English texts on it.I have already added System translation packs.Is there a function / way where the images will change when a specific language is selected?There are image with English texts in them and they need to be rotated out when another language is selected.I am not thinking of changing the actual language on the image, but changing the image itself with a new translated text.Here is an example:On the homepage I have this image "advertising-a-eng.jpg" (see attachment )when language french is selected, this image needs to swap with the same image with french on it, "advertising-a-fr.jpg"make sense?Can anyone help me on this please! Thank you for your time... Link to comment Share on other sites More sharing options...
pedrodonkey Posted June 23, 2010 Share Posted June 23, 2010 Needed the same functionality implemented into a store I'm working on and came across this thread: http://www.prestashop.com/forums/viewthread/46525/general_discussion/solved_if_code_depending_on_langage Here's an example: {if $cookie->id_lang == 1} {else} {/if} Change id_lang == 1 to the number of the language you want to use which can be found in the back end under Tools > Languages. Link to comment Share on other sites More sharing options...
evolution.x Posted January 12, 2011 Share Posted January 12, 2011 Hi,This is the code i was looking for alos but i need to implement it so the image swaps for more than 2 langs.I have 4 langs set up on my site and need to change the image to the relevant lang.Any help would be appreciated.Regards Link to comment Share on other sites More sharing options...
mrplow Posted February 4, 2011 Share Posted February 4, 2011 Hi,This is the code i was looking for alos but i need to implement it so the image swaps for more than 2 langs.I have 4 langs set up on my site and need to change the image to the relevant lang.Any help would be appreciated.Regards You don't need to use an if...You can use the iso code when calling the image file location.So say you have 4 images, image-en.jpg, image-fr.jpg, image-es.jpg, image-tr.jpg Just use Works for me! Link to comment Share on other sites More sharing options...
yvesbj Posted April 7, 2011 Share Posted April 7, 2011 thank thank thank mrplow !!!! Link to comment Share on other sites More sharing options...
mrplow Posted April 8, 2011 Share Posted April 8, 2011 Pleased that I could help! Taken lots of help from the forum Link to comment Share on other sites More sharing options...
Hasini Posted August 20, 2012 Share Posted August 20, 2012 But where do you change the preferences to CALL the other images with the ISO code? I mean, once the user chose a language, where do you modify which pictures does that specific language use? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now