Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   Different logo with different language (http://forum.bytesforall.com/showthread.php?t=4148)

madfab685 Oct 31, 2009 11:27 AM

Different logo with different language
 
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

juggledad Nov 2, 2009 04:28 AM

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'];
  }


madfab685 Nov 3, 2009 03:36 PM

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

juggledad Nov 3, 2009 06:05 PM

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'];
  }


madfab685 Nov 4, 2009 02:32 PM

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

kyriakos Dec 4, 2009 10:36 AM

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


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

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