Created
February 28, 2012 15:27
-
-
Save roose/1933129 to your computer and use it in GitHub Desktop.
Wordpress languages block(Qtranslate)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function get_qlang(){ | |
| global $q_config; | |
| foreach(qtrans_getSortedLanguages() as $language) { | |
| if(is_404()) $url = get_option('home'); else $url = ''; | |
| echo '<li'; | |
| if($language == $q_config['language']) echo ' class="current"'; | |
| echo '><a href="'.qtrans_convertURL($url, $language).'"'; | |
| echo '>'.$q_config['language_name'][$language].'</a>'; | |
| echo '</li>'; | |
| } | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment