Elxis CMS Forum

Support => General => Topic started by: armpouniotis on July 31, 2008, 22:57:28

Title: about language and template
Post by: armpouniotis on July 31, 2008, 22:57:28
Hi all !

is it possible to an image (which is related to the template, and not the content) to change according to the selection of the language ???

e.g. I have designed a logo in Greek. If I choose the English language, how can I make it change to the English logo ???

Thank you in advance

Christos Armpouniotis
Title: Re: about language and template
Post by: Ivan Trebješanin on July 31, 2008, 23:29:31
In one case I needed this, and I did this:

Code: [Select]
<?php 
global $lang;
if (
$lang == &#39;english&#39;) {
    
$logo = &#39;templates/YourTemplate/images/logo_eng.jpg&#39;;
} else {
    
$logo = &#39;templates/YourTemplate/images/logo_main.jpg&#39;;
}

echo &
#39;<style type="text/css">
div.logo {backgroundurl(&#39;.$logo.&#39;) center top no-repeat}
</style>&#39;;
?>

PS
You can also create custom module with your logo, and then publish each logo module for appropriate language
Title: Re: about language and template
Post by: armpouniotis on August 01, 2008, 12:08:58
Thanx a lot !

i will apply both of your suggestions !

christos