Table of Contents
To run the WordPress translation plugin, you’ll need the following:
- Run PHP 7+ version or above
- Activate the URL rewriting in WordPress settings
It’ll be checked automatically by the plugin
Generate the API Key
After your connection to your Linguise dashboard you’ll need to setup a new domain first and save it’s settings to get the API Key.
The API key is what is required to activate the translation on your website. Basically the API key will check what language is activated on what domain and will allow the neural translation pages to be generated.
Copy the API Key and keep it in your clipboard.
Install the WordPress plugin
After the script is downloaded, install it to your WordPress website as usual using the WordPress plugin installer
Make sure the URL rewriting is activated
In order to load your language on new URLs (like domain.com/es) the permalinks needs to be configured with any rewriting option from the WordPress settings except the plain option (non SEO URLs). otherwise the multilingual URL may generate 404 errors.
Note that the recommended option for SEO optimization is the following one.
Activate the WordPress translation
Once the WordPress plugin is installed and activated, you can access the plugin configuration by using the “Linguise” left menu. The first to look into is the API key field. Paste the API key from your dashboard and click on Apply
- You’ll get the full website language configuration
- All the website should already be translated in all the languages!
Add the language switcher to your website
You have 3 methods to load the website language switcher (flags and language names) to your website on WordPress.
- Use the shortcode below
- Use the WordPress Linguise menu
- Use the PHP snippet
Once it’s added, on the frontend you’ll have the flag and language name displayed.
The alternate option will generate the alternate URL per language, so the search engine can crawl easily all the language version of the page. It’s recommended to let it activated.
An alternate example in the HTML code that will be crawled by search engines:
Setup the language switcher type
The language switcher can be displayed as a popup, a dropdown list, or just aligned side by side. You also have the option to display only the flag or only the language names, or both.
On the right side of the screen, you can use the preview to check the final rendering.
The position setting allows the use of floating positions on your website.
Language switcher flag and text design
There’s many design option that help the language switcher to be loaded anywhere on your website. For example, style won’t be the same on the white top bar and on a dark footer.
Main options are:
- Flags shape and size
- Language names text color
- Shadow of elements on mouse hover
- Mouse hover style
Language switcher setup in video
Language switcher advanced options
Finally, you can setup the advanced options such as cache setting, the amount of URL and translation to store locally to be served faster.
The browser language redirect is not recommended for various reasons detailed here. Basically, it redirects the user to one of the languages that is setup in his browser.
Pre-text and post-text are the HTML content to display in the popup of the language switcher.
Translate WordPress search queries
From the plugin settings, you can activate an option to translate the WordPress search queries and results. Once it’s activated, you can search in your WordPress content in any languages and for example a French request will be made in French content.
All the search that have been made on your wesbite can be found on your Linguise dashboard using the menu Translations > Search queries