The Joomla! Forum ™






Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: Sat Feb 25, 2012 12:09 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Aug 19, 2009 10:36 pm
Posts: 6
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


Top
 Profile  
 
PostPosted: Sat Feb 25, 2012 6:58 pm 
Joomla! Master
Joomla! Master

Joined: Mon Oct 27, 2008 9:27 pm
Posts: 13758
Location: Akershus, Norway
Use a switch statement.

Code:
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;
}


Top
 Profile  
 
PostPosted: Sat Feb 25, 2012 7:05 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Aug 19, 2009 10:36 pm
Posts: 6
Thanks for your reply, but can you describe this more detailed ? I'm no coder... Thanks


Top
 Profile  
 
PostPosted: Sun Feb 26, 2012 12:43 am 
Joomla! Master
Joomla! Master

Joined: Mon Oct 27, 2008 9:27 pm
Posts: 13758
Location: Akershus, Norway
You will find the <div class="art-header"> in index.php

Code:
<div class="art-header header-<?php echo $this->language ?>">
<::before>
<::after>
</div>


Add to template.css:
Code:
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.


Top
 Profile  
 
PostPosted: Sun Feb 26, 2012 5:16 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Aug 19, 2009 10:36 pm
Posts: 6
and where I have to put in the switch statement ?


Top
 Profile  
 
PostPosted: Sun Feb 26, 2012 9:06 am 
Joomla! Master
Joomla! Master

Joined: Mon Oct 27, 2008 9:27 pm
Posts: 13758
Location: Akershus, Norway
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.


Top
 Profile  
 
PostPosted: Sun Feb 26, 2012 3:32 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Aug 19, 2009 10:36 pm
Posts: 6
Can you please write a more detailed procedure ? I'll be verry gratefull .. Thanks


Top
 Profile  
 
PostPosted: Sun Feb 26, 2012 3:41 pm 
Joomla! Master
Joomla! Master

Joined: Mon Oct 27, 2008 9:27 pm
Posts: 13758
Location: Akershus, Norway
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.


Top
 Profile  
 
PostPosted: Wed Jul 04, 2012 8:46 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Nov 15, 2011 11:54 pm
Posts: 1
Location: iran
Per Yngve Berg wrote:
Use a switch statement.

Code:
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


Top
 Profile  
 
PostPosted: Wed Oct 03, 2012 2:52 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 03, 2012 2:33 pm
Posts: 19
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


Top
 Profile  
 
PostPosted: Thu Oct 04, 2012 8:49 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16641
Location: **Translation Matters**
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:
viewtopic.php?f=617&t=718481
They are similar for logos, etc.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Thu Oct 04, 2012 12:19 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 03, 2012 2:33 pm
Posts: 19
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:
viewtopic.php?f=617&t=718481
They are similar for logos, etc.


Top
 Profile  
 
PostPosted: Thu Oct 04, 2012 1:25 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 03, 2012 2:33 pm
Posts: 19
Thx i have it:) Peter


Top
 Profile  
 
PostPosted: Fri Nov 09, 2012 6:50 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Oct 03, 2012 2:33 pm
Posts: 19
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 



Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group