• 0
Sign in to follow this  
Followers 0

trouble : trying to create a lang selector section

Question

  • 0

Posted · Report post

hi, I just started using platform pro and love it, but I'm barefoot when it comes to coding (lets say sandals in the case of html/css). what I would like to have is a language selector at the top right of the header. I installed the qtranslate plugin because WPML is commercial and I just spent money on platform pro... My dream solution would be if it was possible to place the language chooser widget to the respective hook. please help, many thanks! marco

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Posted · Report post

nevermind, i solved it in a simpler way since i have no clue how to do php functions: - i placed the qtranslate language chooser widget into the universal sidebar - in template setup > site header, i placed the universal sidebar on top - in custom css added float:right for the widget and did some positioning -done result can be seen here: http://www.millesi.at/wordpress cheers, marco

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hello, I'm trying to use the solution that Benoit offers here for putting a language selector in the header. I inserted this code into functions.php

// add_action('hook_name','function name');
	add_action('pagelines_inside_bottom_branding', 'add_langselector_to_branding');
	
	// function name
	function add_langselector_to_branding(){
	
	function language_selector_flags(){
	$languages = icl_get_languages('skip_missing=0&orderby=code');
	if(!empty($languages)){
	foreach($languages as $l){
	if(!$l['active']) echo '';
	echo ''.$l['language_code'].'';
	if(!$l['active']) echo '';
	}
	}
	}
	
	?>
	<div id="flags_language_selector"><?php language_selector_flags(); ?></div >
	<?php }
	
	// end function

But I just get the abbreviations for the languages, w/o the selector, which you can see on my site here, just below the logo http://www.skypeenglishclasses.com/. I am using WordPress 3.1 with WPML 2.0.4.1 Thanks!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Ok, I'm going to place my question into a new thread to see if I can get an answer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0