Logo image change in different language option

General questions regarding the use of languages in Joomla! 1.5.

Moderator: General Support Moderators

Locked
gopi_joomla123
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Sep 28, 2010 2:34 pm
Location: chennai

Logo image change in different language option

Post by gopi_joomla123 » Thu Sep 30, 2010 9:40 am

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...

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11614
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Logo image change in different language option

Post by ooffick » Thu Sep 30, 2010 4:53 pm

You could do something like this:

Open you template's index.php file and search for the following line:

Code: Select all

<div id="header">
Try to replace it with this code:

Code: Select all

<?php 
$lang =& JFactory::getLanguage();
if($lang->getTag() == 'en-GB'): ?>
<div id="header_en">
<?php else: ?>
<div id="header">
<?php endif; ?>
and then use the following code in the css file:

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
Olaf Offick - Global Moderator
learnskills.org

gopi_joomla123
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Sep 28, 2010 2:34 pm
Location: chennai

Re: Logo image change in different language option

Post by gopi_joomla123 » Tue Oct 05, 2010 10:45 am

ooffick wrote:You could do something like this:

Open you template's index.php file and search for the following line:

Code: Select all

<div id="header">
Try to replace it with this code:

Code: Select all

<?php 
$lang =& JFactory::getLanguage();
if($lang->getTag() == 'en-GB'): ?>
<div id="header_en">
<?php else: ?>
<div id="header">
<?php endif; ?>
and then use the following code in the css file:

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

I got the results thanks for your help.

weichhold
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Oct 05, 2010 11:02 am

Re: Logo image change in different language option

Post by weichhold » Tue Oct 05, 2010 11:25 am

it was a super help for me!! thanks oofkick!

NicolaCards
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Jan 09, 2012 11:34 am

Re: Logo image change in different language option

Post by NicolaCards » Mon Jan 09, 2012 11:41 am

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

NicolaCards
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Jan 09, 2012 11:34 am

Re: Logo image change in different language option

Post by NicolaCards » Mon Jan 09, 2012 11:44 am

...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.

joaojoomla
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Mon Oct 06, 2014 2:30 pm

Re: Logo image change in different language option

Post by joaojoomla » Tue Oct 28, 2014 10:21 am

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


Locked

Return to “Language - Joomla! 1.5”