Google Translation Config

Basic Configurations

Code Snippets

Menus / Pages / Posts - Single Language at a time

For menu usage, you need to create a new menu, or use an existing menu, by navigating to “Appearance > Menus”.

First you will need to enable “descriptions” for your menu items, which can be found in a tab labeled “Screen Options” in the upper-right area of the page.

Once descriptions are enabled, follow these steps:

  1. Create a new menu item using “Link” as the menu item type.
  2. Use # for the URL
  3. Enter a navigation label of your choice. This label does not appear on your website – it is meant only to help you identify the menu item.
  4. Place the following shortcode into the “description” field, and modify it to display the language and navigation label of your choice:

Just swap out language=”” & label=”” to appropriate languages

[glt language="Spanish" label="Español" image="yes" text="yes" image_size="24"]
[glt language="English" label="English" image="yes" text="yes" image_size="24"]

For template use

<?php echo do_shortcode('[google-translator]'); ?>

Page / Posts / Sidebars

[google-translator]