Page 1 of 1
Different header for each language
Posted: Sat Feb 25, 2012 12:09 pm
by slycrespo
Hello!
On my joomla site (
http://www.moj-otok.si) I have 4 different languages (slovenian, english, german and croatian). Now I want to have different header for each language. How I do that ?
Thanks for answers!
Sly
Re: Different header for each language
Posted: Sat Feb 25, 2012 6:58 pm
by Per Yngve Berg
Use a switch statement.
Code: Select all
switch ($this->language) {
case 'de-de':
echo "Deutsch";
break;
case 'en-gb':
echo "English";
break;
case 'hr-hr':
echo "croatian";
break;
case 'sl-si':
echo "slovenian";
break;
}
Re: Different header for each language
Posted: Sat Feb 25, 2012 7:05 pm
by slycrespo
Thanks for your reply, but can you describe this more detailed ? I'm no coder... Thanks
Re: Different header for each language
Posted: Sun Feb 26, 2012 12:43 am
by Per Yngve Berg
You will find the <div class="art-header"> in index.php
Code: Select all
<div class="art-header header-<?php echo $this->language ?>">
<::before>
<::after>
</div>
Add to template.css:
Code: Select all
header-de-de::after {
background-image: url("/templates/slycrespo001/images/header-de-de.jpg");
}
header-en-gb::after {
background-image: url("/templates/slycrespo001/images/header-en-gb.jpg");
}
header-hr-hr::after {
background-image: url("/templates/slycrespo001/images/header-hr-hr.jpg");
}
You have to make the images.
Re: Different header for each language
Posted: Sun Feb 26, 2012 5:16 am
by slycrespo
and where I have to put in the switch statement ?
Re: Different header for each language
Posted: Sun Feb 26, 2012 9:06 am
by Per Yngve Berg
You don't need the switch statement. Just append the language to the image file name.
Save it in case you in the future needs something more complex.
Re: Different header for each language
Posted: Sun Feb 26, 2012 3:32 pm
by slycrespo
Can you please write a more detailed procedure ? I'll be verry gratefull .. Thanks
Re: Different header for each language
Posted: Sun Feb 26, 2012 3:41 pm
by Per Yngve Berg
Extensions->Template Manager->slycrespo001->Edit Html
Find the line with "<div class="art-header">" and add the code and save
Edit CSS->template.css. Add the css to the file.
Re: Different header for each language
Posted: Wed Jul 04, 2012 8:46 am
by al_bozorgi
Per Yngve Berg wrote:Use a switch statement.
Code: Select all
switch ($this->language) {
case 'de-de':
echo "Deutsch";
break;
case 'en-gb':
echo "English";
break;
case 'hr-hr':
echo "croatian";
break;
case 'sl-si':
echo "slovenian";
break;
}
thank you
Re: Different header for each language
Posted: Wed Oct 03, 2012 2:52 pm
by bifipf
Hi people, im trying to customize Ifreedom-fjt template in Joomla 2.5 for multilanguage use. I really dont know how to change logo for each language, it would be great if could help me. I have same problem to change Slogan with switching language.
I try make changes here
http://undercity.bonet.sk/~fody/index.php
I'm a newbie to these adjustmens
Thanks for any help
Peter
Re: Different header for each language
Posted: Thu Oct 04, 2012 8:49 am
by infograf768
bifipf wrote:Hi people, im trying to customize Ifreedom-fjt template in Joomla 2.5 for multilanguage use. I really dont know how to change logo for each language, it would be great if could help me. I have same problem to change Slogan with switching language.
I try make changes here
http://undercity.bonet.sk/~fody/index.php
I'm a newbie to these adjustmens
Thanks for any help
Peter
Thisis the 1.5 language forum.
See the tips here:
http://forum.joomla.org/viewtopic.php?f=617&t=718481
They are similar for logos, etc.
Re: Different header for each language
Posted: Thu Oct 04, 2012 12:19 pm
by bifipf
infograf768 wrote:bifipf wrote:Hi people, im trying to customize Ifreedom-fjt template in Joomla 2.5 for multilanguage use. I really dont know how to change logo for each language, it would be great if could help me. I have same problem to change Slogan with switching language.
I try make changes here
http://undercity.bonet.sk/~fody/index.php
I'm a newbie to these adjustmens
Thanks for any help
Peter
Thisis the 1.5 language forum.
See the tips here:
http://forum.joomla.org/viewtopic.php?f=617&t=718481
They are similar for logos, etc.
Re: Different header for each language
Posted: Thu Oct 04, 2012 1:25 pm
by bifipf
Thx i have it:) Peter
Re: Different header for each language
Posted: Fri Nov 09, 2012 6:50 am
by bifipf
I have done it rly hard way:) I created logo with text, because i wanted it in some style and this
was to easiest way for me. If you put this to correct place in index.php it helps.
You can see that it works at
www.termotechna.sk.
Im noobie but allways learning:)
<?php if ($this->countModules('logo')) : ?>
<div class="logo">
<jdoc:include type="modules" name="logo" style="none" />
</div>
<?php elseif ($this->language == 'sk-sk') : ?>
<a href="<?php echo $this->baseurl ?>/">
<img src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/images/logo.png" border="0" class="logo">
</a>
<?php elseif ($this->language == 'en-gb') : ?>
<a href="<?php echo $this->baseurl ?>/">
<img src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/images/logo_en.png" border="0" class="logo">
</a>
<?php elseif ($this->language == 'de-de') : ?>
<a href="<?php echo $this->baseurl ?>/">
<img src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/images/logo_de.png" border="0" class="logo">
</a>
<?php endif; ?>
I hope this helpp
Peter
Re: Different header for each language
Posted: Thu Nov 13, 2014 5:17 am
by ronaldo85
Fantastic contribution
Per Yngve Berg i took away a big headache thanks!!!