language dropdown in header not working
-
Hello, i follow instructions to add the code to the header and functions php. this is what i added.
Insert some code – for example like this –
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
<select id="msls_languages"> <?php if (function_exists ('the_msls')) the_msls (); ?> <select>in your header where you would like to have the drop-down. In your functions.php insert a function like this
function my_msls_output_get( $url, $link, $current ) { return sprintf( '<option value="%s"%s>%s</option>', $url, ( $current ? ' selected="selected"' : '' ), $link ); } add_filter( 'msls_output_get', 'my_msls_output_get', 10, 3 );however, when i click a language in the dropdown menu, the link does not work. in other words, if i am in the english version of the site and i click “spanish”, the label in the dropdown changes to “spanish” but the spanish version of the page does not changes. What could be the problem?
Thanks
The topic ‘language dropdown in header not working’ is closed to new replies.