Elxis CMS Forum

Support => General => Topic started by: LadyHLG on January 15, 2008, 19:14:10

Title: Switch logo depending on language
Post by: LadyHLG on January 15, 2008, 19:14:10
The site I am currently working on will only have two languages, I am wondering how difficult it would be to switch a logo image depending on which language is chosen. Is this info stored in a session variable?

Thanks
LadyHLG
Title: Re: Switch logo depending on language
Post by: datahell on January 15, 2008, 19:23:45
The logo image or anything visible is controlled by your template and the template's CSS. You can create 2 diferrent logo's and afterwards add in your template something like this:

Code: (php) [Select]
<?php 
global $lang;
if (
$lang == &#39;english&#39;) {
    
$logo = &#39;images/english-logo.png&#39;;
} else {
    
$logo = &#39;images/greek-logo.png&#39;;
}

echo &
#39;<img src="&#39;.$logo.&#39;" border="0" alt="logo" />&#39;;
?>
Title: Re: Switch logo depending on language
Post by: Ivan Trebješanin on January 15, 2008, 20:24:28
Another solution would be to create template position (eg. user9) inside your template, and then create module with your logo and publish it for specific language at that position (user9).
Title: Re: Switch logo depending on language
Post by: LadyHLG on January 15, 2008, 20:37:59
Wonderful!
Thanks guys!

LadyHLG