Insert Plugin Language Chooser in Header Top

Language Switcher

In case that you use a plugin for multilingual content on your WordPress site (i.e. qTranslate X). You may want to insert the Language Chooser widget (which comes with the plugin) to the header top right position. Here is a guide how it can be done:

1. Install and Activate the WP Editor plugin:https://wordpress.org/plugins/wp-editor/

It is a very useful plugin which allows you to edit files inside all of the theme folders:

WP Editor Plugin

 

2. Admin Panel -> Left Menu -> Appearance -> Theme Editor

then open inc/utilities.php

After this code (line 196)

// display social sites
if ( $displaySocial ) {
tishonator_show_social_sites( '<ul class="header-social-widget">', '</ul>', '<li>', '</li>',
tishonator_read_customizer_option('tishonator_header_opensocialnewwindow', 1) == 1, 16 );
}
?>

INSERT

<?php dynamic_sidebar( 'translate-widget-area' ); ?>

3. Save Changes

4. Open inc/actions.php

After

// II. Register Widget Areas (line 181)

INSERT

register_sidebar( array (
'name'              =>     __( 'Translate Sidebar', 'tishonator' ),
'id'              =>     'translate-widget-area',
'description'     =>  __( 'Widget area for qTranslate', 'tishonator' ),
'before_widget'     =>  '',
'after_widget'     =>  '',
'before_title'     =>  '',
'after_title'     =>  '',
) );

5. Save Changes

6. Admin Panel -> Left Menu -> Appearance -> Widgets -> Add the translate widget for countries to ‘Translate Sidebar’

7. Save Changes

Please Note: The above changes can be applied to the following themes: tArt, tBachFlowers, tBlogging, tFashion, tFengShui, tGymm, tHomeopathy, tInteriorDesign, tKidd, tMedicine, tMeditate, tPhotography, tPortfolio, tPsychology, tSpirituality, and tTourism.

 

About the Author

Tihomir Ivanov is a WordPress web developer, founder of tishonator.com, a fan of Linux and Open Source, a gym enthusiast, a vegan, a fan of minimalism, good movies and books :)

Leave a Reply