In this article, we’ll briefly discuss integrating WPML switchers into the frontend of your website for both the WordPress end-users and the WordPress developers.
For Users
WPML gives you many options to integrate ways for your visitors to switch between languages on the frontend of your website. However, with our compatible themes, we’ve also integrated a way of incorporating our WPML Bridge plugin’s simple flag list to toggle between languages.

The supported locations for our simple flag list will vary depending on the Theme Blvd theme you’re using. You can set these flag lists to show in these various positions by navigating to WPML > {Your Theme Name} within your WordPress admin panel.
NOTE: You must have the “WPML CMS Nav” addon installed for this options page to show.

For Developers
If you’re a developer, and you’re working within a Child theme, you have many options; you don’t need to feel restricted to the options above.
The above user options actually work by simply hooking our plugin’s tb_wpml_flaglist function to common actions found in most of our themes. You’re free to hook our tb_wpml_flaglist or any WPML function to any theme action you like.
For a complete map of common theme actions, see the article, Primary Framework Action Hooks.
If you were going to hook our plugin’s tb_wpml_flaglist to something, it might look something like this in your Child theme’s functions.php:
add_action( 'themeblvd_main_start', 'tb_wpml_flaglist' ); // Hook wherever you want
And if you wanted to create your own custom function, it might start something like this:
function my_wpml_switcher(){
// construct custom switcher
}
add_action( 'themeblvd_main_start', 'my_wpml_switcher' ); // Hook wherever you want
Additionally, we’ve noticed that WPML likes to suggest inserting action hooks into your theme files, opposed to specific WPML functions. So, you’ll see references throughout WPML’s documentation for inserting snippets such as this into your theme files:
<?php do_action( 'icl_language_selector' ); ?>
Within our robust theme framework’s hook system from functions.php of your Child theme, we can accomplish these same methods something like this:
function my_wpml_switcher(){
do_action( 'icl_language_selector' );
}
add_action( 'themeblvd_main_start', 'my_wpml_switcher' ); // Hook wherever you want
