Different header for each language
Moderator: General Support Moderators
-
- Joomla! Intern
- Posts: 51
- Joined: Wed Aug 19, 2009 10:36 pm
Different header for each language
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
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
- Per Yngve Berg
- Joomla! Master
- Posts: 31084
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Different header for each language
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;
}
-
- Joomla! Intern
- Posts: 51
- Joined: Wed Aug 19, 2009 10:36 pm
Re: Different header for each language
Thanks for your reply, but can you describe this more detailed ? I'm no coder... Thanks
- Per Yngve Berg
- Joomla! Master
- Posts: 31084
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Different header for each language
You will find the <div class="art-header"> in index.php
Add to template.css:
You have to make the images.
Code: Select all
<div class="art-header header-<?php echo $this->language ?>">
<::before>
<::after>
</div>
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");
}
-
- Joomla! Intern
- Posts: 51
- Joined: Wed Aug 19, 2009 10:36 pm
Re: Different header for each language
and where I have to put in the switch statement ?
- Per Yngve Berg
- Joomla! Master
- Posts: 31084
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Different header for each language
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.
Save it in case you in the future needs something more complex.
-
- Joomla! Intern
- Posts: 51
- Joined: Wed Aug 19, 2009 10:36 pm
Re: Different header for each language
Can you please write a more detailed procedure ? I'll be verry gratefull .. Thanks
- Per Yngve Berg
- Joomla! Master
- Posts: 31084
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Different header for each language
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.
Find the line with "<div class="art-header">" and add the code and save
Edit CSS->template.css. Add the css to the file.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Nov 15, 2011 11:54 pm
- Location: iran
- Contact:
Re: Different header for each language
thank youPer 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; }
-
- Joomla! Apprentice
- Posts: 19
- Joined: Wed Oct 03, 2012 2:33 pm
Re: Different header for each language
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
I try make changes here http://undercity.bonet.sk/~fody/index.php
I'm a newbie to these adjustmens
Thanks for any help
Peter
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Different header for each language
Thisis the 1.5 language forum.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
See the tips here:
http://forum.joomla.org/viewtopic.php?f=617&t=718481
They are similar for logos, etc.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Apprentice
- Posts: 19
- Joined: Wed Oct 03, 2012 2:33 pm
Re: Different header for each language
infograf768 wrote:Thisis the 1.5 language forum.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
See the tips here:
http://forum.joomla.org/viewtopic.php?f=617&t=718481
They are similar for logos, etc.
-
- Joomla! Apprentice
- Posts: 19
- Joined: Wed Oct 03, 2012 2:33 pm
Re: Different header for each language
Thx i have it:) Peter
-
- Joomla! Apprentice
- Posts: 19
- Joined: Wed Oct 03, 2012 2:33 pm
Re: Different header for each language
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
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
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Nov 13, 2014 4:52 am