简体   繁体   中英

Insert a logo in a multilingual website

I created the following website which is in Greek and also has an English version. I can change the blue-white logo from the template folder from the index.php file. I have also exactly same logo in English version. I want the Greek version with Greek logo and English version with english logo. I named my logos as logo2-en-gb.png and logo2-gr-gr.png. Do you know how can I insert it in the index.php file? The website is:

http://www.karabatakis.gr

and the part in index.php is

<div id="header">
     <div id="companyname" style="height:0%">
        <img style="width:77%"  src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/logo2-en-gb.png" />

        <!-- <a href="<?php echo $this->baseurl ?>"> <?php echo $mainframe->getCfg('sitename') ;?> </a>-->
        <div id="slogan">
           <!-- ΠΟΛΙΤΙΚΟΣ ΜΗΧΑΝΙΚΟΣ -->
        </div>
        <div id="search">
           <jdoc:include type="modules" name="user4" />
        </div>
     </div>

I tried something like this but it does not show me the image

<img style="width:77%"  src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/logo2-".<?php echo $this->language; ?>.".png" />

Try

if($this->language == en) {
$logo = 'logo2-en-gb.png';
} else { 
$logo = 'logo2-en-gr.png';
}

Then where logo goes echo logo.

<?php echo $logo; ?>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM