Install Linguise neural translation on a WordPress website

Table of Contents

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.

translation-API-key

Install the WordPress plugin

Now you need to install the WordPress plugin to activate the language switcher (flags with language switcher). You can download the latest version from the WordPress plugin directory.

After the script is downloaded, install it to your WordPress website as usual using the WordPress plugin installer

add-linguise-plugin

Once the WordPress plugin is installed and activated you can access the plugin configuration by using the “Linguise” left menu and setup the:

  • Language switcher display (flags and language title)
  •  The default language and flags activated
plugin-linguise-display

Use the shortcode [linguise] to display the language switcher anywhere.

You can use a plugin to load shortcode in a menu such as Shortcode in Menus

Finally you can setup pre and post text (HTML) to display in the popup of the language switcher. 

alternate-and-pre-text

The alternate option will generate the alternate URL per language, so the search engine can crawl easily all the language version of the page. Here’s the language switcher rendering:

language-flag

An alternate example in the HTML code that will be crawled by search engines:

alternate-links

Install on WordPress with IIS servers

Add the line corresponding to your CMS in your Web.config file.
It should be set before any other redirection, especially the redirection to your PHP main file:

				
					<rule name="Linguise language redirection" stopProcessing="true">
	<match url="^(af|sq|am|ar|hy|az|eu|be|bn|bs|bg|ca|ceb|ny|zh-cn|zh-tw|co|hr|cs|da|nl|en|eo|et|tl|fi|fr|fy|gl|ka|de|el|gu|ht|ha|haw|iw|hi|hmn|hu|is|ig|id|ga|it|ja|jw|kn|kk|km|ko|ku|ky|lo|la|lv|lt|lb|mk|mg|ms|ml|mt|mi|mr|mn|my|ne|no|ps|fa|pl|pt|pa|ro|ru|sm|gd|sr|st|sn|sd|si|sk|sl|so|es|su|sw|sv|tg|ta|te|th|tr|uk|ur|uz|vi|cy|xh|yi|yo|zu|zz-zz)(?:$|/)(.*)$"  />
	<action type="Rewrite" url="/wp-content/plugins/linguise/script.php?linguise_language={R:1}&amp;original_url={R:2}"  appendQueryString="true" />
</rule>
				
			

Install on WordPress with NGINX servers

Add the line corresponding to your CMS in your NGINX server configuration block.
It should be set before any other redirection, especially the redirection in your PHP main file.
				
					rewrite ^/(af|sq|am|ar|hy|az|eu|be|bn|bs|bg|ca|ceb|ny|zh-cn|zh-tw|co|hr|cs|da|nl|en|eo|et|tl|fi|fr|fy|gl|ka|de|el|gu|ht|ha|haw|iw|hi|hmn|hu|is|ig|id|ga|it|ja|jw|kn|kk|km|ko|ku|ky|lo|la|lv|lt|lb|mk|mg|ms|ml|mt|mi|mr|mn|my|ne|no|ps|fa|pl|pt|pa|ro|ru|sm|gd|sr|st|sn|sd|si|sk|sl|so|es|su|sw|sv|tg|ta|te|th|tr|uk|ur|uz|vi|cy|xh|yi|yo|zu|zz-zz)(?:$|/)(.*)$ /wp-content/plugins/linguise/script.php?linguise_language=$1&original_url=$2 last;