return the current language (slug) of a webpage: useful for theme’s developer
example of use to subselect a navigation menu in a child of twentyten :
<?php if ( "en_us" == the_curlang() ) { wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); } else { wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primaire' ) ); } ?> |
In this example, the theme offers a way to have for users a specific navigation menu for target languages.
the return value is available just before to build the webpage after the wp_query.
more functions in plugin’s source (at end) and here in one table.