Multi-language (GTranslate)
Want visitors to read your site in their own language? The free GTranslate plugin adds instant, on-the-fly translation with a clean language switcher you can drop right into your menu. Paired with the Shortcode in Menus plugin, you can place the switcher directly in your Leverage navigation.
Step 1: Install the plugins
Section titled “Step 1: Install the plugins”-
Add GTranslate. In WordPress, go to Plugins » Add New, search for GTranslate, then install and activate it.
-
Add Shortcode in Menus. Still under Plugins » Add New, search for Shortcode in Menus, then install and activate it. This lets you place shortcodes inside WordPress menus.
Step 2: Configure GTranslate
Section titled “Step 2: Configure GTranslate”-
Open the settings. Go to Settings » GTranslate.
-
Choose the look. Set Widget look to Flags for a compact, flag-based switcher.
-
Pick your languages. Check the languages you want to offer visitors.
-
Save. Save your changes.
Step 3: Add the switcher to your menu
Section titled “Step 3: Add the switcher to your menu”Now place the language switcher in your navigation using a shortcode menu item.
-
Open Menus. Go to Appearance » Menus.
-
Add a Shortcode item. In the left panel, open the Shortcode section (added by Shortcode in Menus). Give it a title and put the following in the content field:
[gtranslate] -
Add and save. Click Add to Menu, position the item where you want it, then click Save Menu.
Optional: Style the switcher
Section titled “Optional: Style the switcher”To fine-tune how the switcher sits in your header, add a little custom CSS under Theme Settings » Advanced » Custom CSS:
.navbar-nav .glink { margin: 0 5px; }.menu .menu-item-object-gs_sim { display: flex; padding: 15px 0; }The first rule adds breathing room between flags; the second vertically aligns and pads the switcher menu item. Adjust the values to match your header’s spacing.