Logo image change in different language option
Moderator: General Support Moderators
-
- Joomla! Apprentice
- Posts: 10
- Joined: Tue Sep 28, 2010 2:34 pm
- Location: chennai
Logo image change in different language option
Hi friends,
i have used in multilingual language used in joomfish component. English and Tamil. How to change the logo image in two different language. Please give me the solution.
MY CODE html code:
<div id="header">
<h1><a href="#">Example Company Name</a></h1>
</div>
css:
#header h1 a {background:url("../../images/en/logo.png") no-repeat scroll left top;}
Any solution guys...
i have used in multilingual language used in joomfish component. English and Tamil. How to change the logo image in two different language. Please give me the solution.
MY CODE html code:
<div id="header">
<h1><a href="#">Example Company Name</a></h1>
</div>
css:
#header h1 a {background:url("../../images/en/logo.png") no-repeat scroll left top;}
Any solution guys...
- ooffick
- Joomla! Master
- Posts: 11614
- Joined: Thu Jul 17, 2008 3:10 pm
- Location: Ireland
- Contact:
Re: Logo image change in different language option
You could do something like this:
Open you template's index.php file and search for the following line:
Try to replace it with this code:
and then use the following code in the css file:
Olaf
Open you template's index.php file and search for the following line:
Code: Select all
<div id="header">
Code: Select all
<?php
$lang =& JFactory::getLanguage();
if($lang->getTag() == 'en-GB'): ?>
<div id="header_en">
<?php else: ?>
<div id="header">
<?php endif; ?>
Code: Select all
#header_en h1 a {background:url("../../images/en/logo.png") no-repeat scroll left top;}
#header h1 a {background:url("../../images/en/otherlogo.png") no-repeat scroll left top;}
Olaf Offick - Global Moderator
learnskills.org
learnskills.org
-
- Joomla! Apprentice
- Posts: 10
- Joined: Tue Sep 28, 2010 2:34 pm
- Location: chennai
Re: Logo image change in different language option
ooffick wrote:You could do something like this:
Open you template's index.php file and search for the following line:Try to replace it with this code:Code: Select all
<div id="header">
and then use the following code in the css file:Code: Select all
<?php $lang =& JFactory::getLanguage(); if($lang->getTag() == 'en-GB'): ?> <div id="header_en"> <?php else: ?> <div id="header"> <?php endif; ?>
OlafCode: Select all
#header_en h1 a {background:url("../../images/en/logo.png") no-repeat scroll left top;} #header h1 a {background:url("../../images/en/otherlogo.png") no-repeat scroll left top;}
I got the results thanks for your help.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Oct 05, 2010 11:02 am
Re: Logo image change in different language option
it was a super help for me!! thanks oofkick!
-
- Joomla! Fledgling
- Posts: 2
- Joined: Mon Jan 09, 2012 11:34 am
Re: Logo image change in different language option
Hi, I am not a css master... I have a similar problem: I want to customize the logo header according to the language.
I am using a beez_20 template with some customization...
The image is in this part of the personal.css file
#all #header
{padding-top:1.0em ;
}
.logoheader
{
background: #fff URL(../images/personal/personal2.png) no-repeat bottom right ;
color:#660000;
min-height:250px;
margin:0em 0px 0 10px !important;
}
How can I refer to this and apply what you suggested? I beleive this is a slightly different context....
Thank you in advance
Nicola
I am using a beez_20 template with some customization...
The image is in this part of the personal.css file
#all #header
{padding-top:1.0em ;
}
.logoheader
{
background: #fff URL(../images/personal/personal2.png) no-repeat bottom right ;
color:#660000;
min-height:250px;
margin:0em 0px 0 10px !important;
}
How can I refer to this and apply what you suggested? I beleive this is a slightly different context....
Thank you in advance
Nicola
-
- Joomla! Fledgling
- Posts: 2
- Joined: Mon Jan 09, 2012 11:34 am
Re: Logo image change in different language option
...and let me add what I found in the template's index.php file
<div id="all">
<div id="back">
<div id="header">
<div class="logoheader">
<h1 id="logo">
<?php if ($logo): ?>
<img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($logo); ?>" alt="<?php echo htmlspecialchars($templateparams->get('sitetitle'));?>" />
<?php endif;?>
<?php if (!$logo ): ?>
<?php echo htmlspecialchars($templateparams->get('sitetitle'));?>
<?php endif; ?>
<span class="header1">....
etc.
<div id="all">
<div id="back">
<div id="header">
<div class="logoheader">
<h1 id="logo">
<?php if ($logo): ?>
<img src="<?php echo $this->baseurl ?>/<?php echo htmlspecialchars($logo); ?>" alt="<?php echo htmlspecialchars($templateparams->get('sitetitle'));?>" />
<?php endif;?>
<?php if (!$logo ): ?>
<?php echo htmlspecialchars($templateparams->get('sitetitle'));?>
<?php endif; ?>
<span class="header1">....
etc.
-
- Joomla! Apprentice
- Posts: 21
- Joined: Mon Oct 06, 2014 2:30 pm
Re: Logo image change in different language option
Hi Oofick,
I follow the procedure, cause I had the same doubt and it all went well. But I had to write the css in the html file I don't know why, but it is working.
I have another question. In this site www.date.pt as you can see in the fotter I have "Termos e Condições" and "Política de Privacidade". This was created by default on the backoffice template.
But now I have a site in english, but I can't change the name of the links "Termos e Condições" and "Política de Privacidade" to the english site version. I created the categories and the articles for the english site version, but the links remain in portuguese (I think it is because it's made by de Joomla backoffice). How is it possible to solve this situation?
Thanks
I follow the procedure, cause I had the same doubt and it all went well. But I had to write the css in the html file I don't know why, but it is working.
I have another question. In this site www.date.pt as you can see in the fotter I have "Termos e Condições" and "Política de Privacidade". This was created by default on the backoffice template.
But now I have a site in english, but I can't change the name of the links "Termos e Condições" and "Política de Privacidade" to the english site version. I created the categories and the articles for the english site version, but the links remain in portuguese (I think it is because it's made by de Joomla backoffice). How is it possible to solve this situation?
Thanks