Different Images for Different Languages in Prestashop

In our previous post, we already manage to change sub category header images that you could read more at different header images for different sub category post. Now, if your store is only served one language is okay but what about if your store is a multi languages store ? That another problem that you must deal with.

Here  are few tips how to change the images, so it will have different images for different languages

If they are added using CSS, change line 39 of header.tpl in your theme's directory from :

<body {if $page_name}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if}>
to something like

<body {if $page_name}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if} class="lang{$cookie->id_lang}">
So that you can target any object of the page for a specific language. For example, the following code gives the website's a different background depending on the current language :

body.lang1 { background: url('../img/bg_en.jpg'); }
body.lang2 { background: url('../img/bg_fr.jpg'); }