-
AuthorPosts
-
daimondd Friend
daimondd
- Join date:
- April 2008
- Posts:
- 29
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 2
- Thanked:
- 5 times in 1 posts
April 1, 2011 at 9:56 pm #162274I am trying to use different logos for each language on my site…
If that is complicated i would like to create an extra module in the header position so that i can replace the logo by disabling it and translate the new module.Thanks
khoand Friend
khoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
April 2, 2011 at 9:32 am #384583Hi,
You try this way:
– Suppose that you have two language: en-GB, vi-VN. And you have 2 image: <joomla url>templatesja_rasiteimageslogo1.png, <joomla url>templatesja_rasiteimageslogo2.png
– You put the code
LOGO_LINK="logo1.png"
into <joomla url>languageen-GBen-GB.ini file
– You put the code
LOGO_LINK="logo2.png"
into <joomla url>languagevi-VNvi-VN.ini file
– Replace <joomla url>templatesja_rasiteblocksheader.php file
<h1 class="logo">
<a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $siteName; ?></span></a>
</h1>
with
<h1 class="logo">
<a href="index.php" title="<?php echo $siteName; ?>" style="background: url(../images/<?php echo JText::_('LOGO_LINK'); ?>) no-repeat left;"><span><?php echo $siteName; ?></span></a>
</h1>
Sherlock Friend
Sherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
April 2, 2011 at 10:00 am #384590Dear daimondd,
If your template is rasite you can open the file templatesja_rasitelayoutsblocksheader.php,you would see this HTML Code
<h1 class=”logo”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
</h1>
You can add a if statement here to detect the languages and add deffirent logo class for each language,for example a block like this
[PHP]<?php if(JRequest::getCmd(‘lang’) == “en”) { ?>
<h1 class=”logo”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
</h1>
<?php }elseif(JRequest::getCmd(‘lang’) == “es”){ ?>
<h1 class=”logo1″>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
</h1>
<?php } ?> [/PHP]
so on..Here you have two class are logo and logo1 and you can add deffirent background images for each of them.
Hope that it is clear and you can do it yoursefl. -
AuthorPosts
This topic contains 3 replies, has 3 voices, and was last updated by Sherlock 13 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum