Forums / Cotonti / Support / Different image for lang

cnr d
#1 2013-08-25 09:12

Hey everyone

Is there any way Display different image for each language in template?

Twiebie
#2 2013-08-25 12:27

You could use something like:

<!-- IF {PHP.usr.lang} == 'en' -->
<img src="yourimagehere" />
<!-- ENDIF -->

Where 'en' is the code of the language pack, so you could replace that with 'nl' or 'ru', etc.

Kort
#3 2013-08-26 06:26

Alternatively you can just use

<img src="themes/{PHP.theme}/img/somepic-{PHP.usr.lang}.jpg" alt="" />

- provided you've got somepic-en.jpg etc in the img folder

SED.by - создание сайтов, разработка плагинов и тем для Котонти