Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

Different logo with different language


  #1  
Old Oct 31, 2009, 12:27 PM
madfab685
 
15 posts · Aug 2009
Hello there,

I need to have 2 differents logos depending on the language (english or french). I am working with qtranslate and I thought I was able to insert something like the following.

<?php _e('[lang_en]logo1.png[/lang_en][lang_fr]logo2.png[/lang_fr]') ?>

I thought I could simply add this code directly where it says "show logo image?"

Can anybody help me on this?

Many thanks

Fabrice
  #2  
Old Nov 2, 2009, 05:28 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
in ver 3.4.4 edit bfa_header_config.php and locate lines148-152 which are
HTML Code:
     // if this is Wordpress and not WPMU, print the logosymbol.gif in the theme folder right away
     } else { 
       $logo_area .= $bfa_ata['template_directory'] . '/images/' . $bfa_ata['logo'] . '" alt="' . 
       $bfa_ata['bloginfo_name']; 
     } 
and change them to
HTML Code:
   // if this is Wordpress and not WPMU, print the logosymbol.gif in the theme folder right away
   } else { 
     $logo_area .= $bfa_ata['template_directory'] . '/images/'
     $logo_area .= _e('[lang_en]logo1.png[/lang_en][lang_fr]logo2.png[/lang_fr]')
     $logo_area .=  '" alt="' . $bfa_ata['bloginfo_name']; 
   } 
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Nov 3, 2009, 04:36 PM
madfab685
 
15 posts · Aug 2009
Hi Juggledad,

Thanks for your help. It did not work because I am not sure about my code.
I went back on the qtranslate forum and I saw something like this:
<?php if (qtrans_getLanguage() == 'en') : ?>english html here<?php else : ?>french html here<?php endif; ?>

Any chance to embed this ?

Thanks again
  #4  
Old Nov 3, 2009, 07:05 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you can try this - you need to come up with the html inserts for both english and french
HTML Code:
  // if this is Wordpress and not WPMU, print the logosymbol.gif in the theme folder right away
   } else { 
     $logo_area .= $bfa_ata['template_directory'] . '/images/'
     if (qtrans_getLanguage() == 'en') : $lang_logo = 'english html here' 
     else : $lang_logo = 'french html here' endif;
     $logo_area .= $lang_logo
     $logo_area .=  '" alt="' . $bfa_ata['bloginfo_name']; 
   }
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Nov 4, 2009, 03:32 PM
madfab685
 
15 posts · Aug 2009
Hi Juggledad

I tried to sort it out but my knowledge is limited. Apparently the qtranslate function needs to be declared somewhere. I don't want to bother you more with my problem.

Thanks again
MadFab685
  #6  
Old Dec 4, 2009, 11:36 AM
kyriakos
 
1 posts · Dec 2009
That's some months ago but you guys helped me out a lot with what you wrote...

Mad, the key lies in your code actually.
You edit the header.php and look for

<div id="header">
<div id="header-left">
there you get something like :

<a href="<?php bloginfo('url'); ?>"><img src=" SOMETHING " ETC ETC>

hopefully (I'm quite new with WP, so I hope that's the same with every theme etc.)

in the src for the img you write, that is within the " ":

<?php if (qtrans_getLanguage() == 'en') : ?><?php bloginfo('stylesheet_directory'); ?>/images/logoENG.gif<?php else : ?><?php bloginfo('stylesheet_directory'); ?>/images/logo.gif<?php endif; ?>

where logoENG.gif is your english logo and logo.gif is your french one (I gather you have French as default...)

anyway, a nice one for anybody looking for something like this...

Bookmarks

Tags
language, logo, qtranslate



Similar Threads
Thread Thread Starter Forum Replies Last Post
Other language Newgamer Languages & Translations 13 May 24, 2010 01:10 PM
Language Switcher and Atahualpa 3 arnaud Plugins & Atahualpa 19 Sep 17, 2009 08:57 AM
xili-language plugin atunoa Plugins & Atahualpa 1 Jul 14, 2009 07:06 PM
Switch positions of logo and search box? Logo on right side DogBot Header configuration & styling 1 Jun 12, 2009 11:17 AM
How change language Diego Velazquez Languages & Translations 17 May 11, 2009 03:58 PM


All times are GMT -6. The time now is 12:46 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.