Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Languages & Translations (http://forum.bytesforall.com/forumdisplay.php?f=11)
-   -   Change vertical language selector in the configuration panel of Atahualpa? (http://forum.bytesforall.com/showthread.php?t=20396)

Carme May 27, 2013 06:25 AM

Change vertical language selector in the configuration panel of Atahualpa?
 
Hi,
I added in the site I am doing a WPML plugin.
I have the language selector already in a header widget I created for that.
The plugin gives me only the option of a vertical language selector.

http://carme.karmeba.com/

I asked them How can I change the vertical language selector to a horizontal one?
Here the answer:

ANSWER: Copy the following code into your theme's functions.php file.

function language_selector(){
$languages = icl_get_languages('skip_missing=0&orderby=code');
if(!empty($languages)){
foreach($languages as $l){
if(!$l['active']) echo '<a href="'.$l['url'].'">';
echo '<img src="'.$l['country_flag_url'].'" height="12" alt="'.$l['language_code'].'" width="18" style="margin:1px; border:1px solid #333;"/> '.$l['native_name'];
if(!$l['active']) echo '</a>';
}
}
}

Then give the call to function language_selector() wherever you want to make it appear in header.php file

<?php language_selector(); ?>

MY question is:
There is any way I can managed to get a horizontal language selector in my header doing that in the configuration panel of Atahualpa, without changing code in PHP.

Any help will be really appreciated,

carme

lmilesw May 27, 2013 06:46 AM

I think the Code Snippets plugin let's you add to the functions.php virtually.


All times are GMT -6. The time now is 02:18 AM.

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