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 » Languages & Translations »

Different Header Images for Different Languages using WPML


  #1  
Old Jun 2, 2014, 03:42 AM
moomum
 
164 posts · Aug 2010
Different Header Images for Different Languages using WPML

Hello
I'm using WPML for http://papallaitants.fr/
It's going ok so far but I'd like the banner to be in French when it's a French reader and English when it's an English reader.

I found this https://wpml.org/forums/topic/can-i-...each-language/ which is helpful. It tells me to add some code.

"you need insert the link into img tags.

Then add the code into your header.php file where you display your logo.

<?php
if (ICL_LANGUAGE_CODE == 'en') { ?>

<img src="http://earlymusicbesalu.com/site/wp-content/themes/earlymusicbesalu/images/logo-eng-2012.png"/>

<?php
} else if (ICL_LANGUAGE_CODE == 'es') { ?>
<img src="http://earlymusicbesalu.com/site/wp-content/themes/earlymusicbesalu/images/logo-es-2012.png" />

<?php
} else if (ICL_LANGUAGE_CODE == 'ca') {?>
<img src="http://earlymusicbesalu.com/site/wp-content/themes/earlymusicbesalu/images/logo-ca-2012.png" />

<?php
} else if (ICL_LANGUAGE_CODE == 'fr') {
?>
<img src="http://earlymusicbesalu.com/site/wp-content/themes/earlymusicbesalu/images/logo-fr-2012.png"/>
<?php
}
?>

This seems clear enough but where is the header.php file?
Or is there a different way to do it?
  #2  
Old Jun 2, 2014, 05:42 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
You could perhaps add a new widget area where %image is in the configure header area box and add the code to a php aware widget that you put in that widget area.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Jun 2, 2014, 05:46 AM
moomum
 
164 posts · Aug 2010
Thanks Larry but that is way way over my head and out of my league.
Is it possible to add code to the header.php file and if so please can you tell me where it is

Last edited by moomum; Jun 2, 2014 at 06:29 AM.
  #4  
Old Jun 2, 2014, 08:32 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
header.php is in the theme folder but I don't thing that will be any easier for you or will even work. I never edit the theme files as the edit won't stay during an upgrade.

Adding a new widget area is no big deal. If you look in the theme options there are instructions on how to add a new widget area. Then you can search on wordpress.org for a php aware widget.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #5  
Old Jun 2, 2014, 08:57 AM
moomum
 
164 posts · Aug 2010
Thank you Larry, I'll take a deep breath and dive in
  #6  
Old Jun 2, 2014, 08:59 AM
moomum
 
164 posts · Aug 2010
if I can sort out the widget thing do I just use the code in the original post but with my links in a php aware widget?

Bookmarks

Tags
header, images, wpml

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Different rotating header images in different languages freelancekonsulenten Header configuration & styling 0 Aug 7, 2011 05:33 AM
[SOLVED] WPML &amp; Atahualpa -&gt; How to place a horizontal language switch in the header Flavio Header configuration & styling 4 Jul 6, 2011 07:02 AM
Languages? crashtest ThemeFrame Presales 2 Dec 19, 2010 05:12 AM


All times are GMT -6. The time now is 07:40 AM.


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