I present Weglot in detail and explain how to implement it on your sites to make them multilingual and offer a first version translated automatically.
Before we begin this article, a clarification is in order. I am the developer in charge of the WordPress part at Weglot. So it's with great pleasure that I'm going to talk to you about this tool I'm working on every day. You can also meet me on the Weglot booths at the different WordPress and web events.
Weglot is a freemium service. It offers a free plan up to 2000 translated words. For the first 10 days, you have a trial version offering you more words and languages.
Weglot : Presentation and operation
Weglot, it's already 50,000 sites translated, including 30,000 sites WordPress! With an appreciation of 4.9 stars out of 5 on the official catalogue of plugins WordPress , based on nearly 1,000 evaluations. It is also more than 100 supported languages.
Weglot is recognized as the easiest way to make a multilingual site! Indeed, the integration methods are very simple and quick to set up.
With Weglot, it is not necessary to handle translations of themes and plugins by manipulating .mo and .po files (hopefully the editors of the latter have taken multilingualism into account). We also no longer need to duplicate every piece of content on our sites to translate them. The database is not overloaded with Weglot, the only information to be stored on your sites are those displayed in the options page ofplugin and the custom URLs.
To offer a translated version of our site, Weglot works as follows:
- Intercept the original content: When a translated page is called, Weglot will detect it and will intercept its HTML content.
- Content analysis: Before being displayed, the content will be analyzed in order to identify the texts to be translated (as well as the media URLs if this option is activated).
- Exchange with the Weglot API: This content is then sent to the Weglot API which will then return all the translations of this content.
Either the translation is already known by the API (either because it has already been automatically translated or because it has already been manually modified) and is directly returned, or it is unknown and an automatic translation will be proposed.
It is therefore a site already fully rendered multilingual and translated that you will get just after activating theplugin Weglot and entering your API key. 🎉 🎊 🎉
So far I have talked about service and not yet aboutplugin WordPress . Indeed, this tool integrates with all web technologies. In the case of WordPress, the integration can be done with a plugin. But it is possible to translate all kinds of sites. You can read more about the different integration possibilities of Weglot here: https: //weglot.com/integrations/.
Weglot: Translating and making a site multilingual WordPress
The first step is to create an account to access the translation administration and our API key. This API key connects Weglot with the site to be translated and made multilingual.
Always in a spirit of simplicity, the creation of the account requires only 2 informations : An email address and a password.
You will then immediately receive a confirmation email with a link that will take you to your famous API key. Copy it and keep this page aside.
Now that we have our API key, we need to install theplugin Weglot on WordPress. From your back office, go to " plugins " then " Add ". Look for theplugin " Weglot ", install it and activate it.
Once installed and activated, a new "Weglot" entry appeared in the left menu of your back office. Click on it to display the settings page ofplugin.
In a first step, you will be asked for 3 pieces of information:
- Your API key: Copy and paste the key we just created
- The original language of the site
- The languages you want for the translations of your site
Once you've completed them, all you have to do is validate for the magic to happen! A modal window appears to inform you that your site is now multilingual and translated. You are invited to visit the home page of your site and enjoy the result.
When starting Weglot on your site, the default language selector will be used, placed at the bottom right of the pages.
Weglot: Set the language selector switch
By default, Weglot adds a language selector placed at the bottom right of the browser on the pages of your site. But different options are proposed to you to be able to place the selector at the place which will suit you best. These methods are also recalled in the options ofplugin.
In a menu
By going to the menu administration (Appearance => Menus), you can see that it is possible, after setting up Weglot, to add the language selector as a menu item.
Like a Widget
By going to the Widgets administration, you can now add a Weglot widget that will display the language selector.
You can set the language selector using the shortcode
Using the HTML tag
You can set the language selector using the following HTML code snippet:
Weglot: Customize the language selector
Let's go back to the Weglot settings page to see the new options available to us.
After the language and API key options previously completed, we now have the options related to the design of the language selector with a preview of it.
Customizing the language selector
Several options are available to customize your language selector. It can be displayed as a drop-down list or one next to the other. It is possible to use or not use flags. To display or not to display the name of the language, or to use only 2 letters to identify them.
You can choose between 4 flag designs. You also have options to customize the language flags for different countries. For example, you can symbolize the English version of your site with an English, American, Australian, Jamaican, etc. flag.
Weglot: Exclusion of blocks and URLs
Still in the Weglot options, we have block exclusions and URL exclusions. The URL exclusion can for example be applied to your legal notice page. And block exclusion can be applied to names and pseudonyms displayed on your site.
You can also decide to make only a small part of your site multilingual, such as your homepage or your about page. To do this, you can, with a regex, exclude all the pages of the site except those you want to see translated.
Weglot: Configuration and advanced options
Redirect visitors according to the language of their browser
If you enable auto redirection, users coming to your homepage will be redirected to the translated page according to the language set in their web browsers.
Translate Emails on the fly
By enabling this option, emails will be translated before being sent to your users. This option is very useful if you offer an online shop.
Translate the MPA version of your site
If you offer an MPA version of your site, activate this option if you want to make it multilingual and translated.
Make the search usable in all languages
This option will allow you to search your site from any language.
To enable this, each search made by your users on the translated versions of your site is translated on the fly by Weglot into the original language of the site before being carried out. Thus, the search results displayed are the same as if the search had been made in the original version, but displayed translated for your users.
Making languages private
If you want to be able to test your multilingual site without displaying it to your users, you can switch languages in private mode.
Weglot: Manage your translations in the Dashboard
The Dashboard is the place where we will be able to manage and modify all our translations, consult our statistics of visits to the translated pages as well as the parameters.
Dashboard Weglot : Translations
The "translation" part is where we will be able to find all our translation pairs, for all our configured language pairs.
A search engine allows us to find specific translations. It is also possible to sort them by URL, by type (text, Meta Information for SEO, or media), or by quality (automatic, manual or professional).
Dashboard Weglot : Visual editor
Weglot also offers a visual editor to manage translations. This allows us to visualize our site by adding markers around all the translatable elements. By clicking on it, you can then see all the translations of the element and edit them.
Dashboard Weglot : Translation tools
The "Translation tools" section will allow us to search and replace terms within the translations, and will allow us to set up a glossary for our translations.
Translation tools : The glossary
The glossary section will allow us to apply rules to our translations. For example, I can impose to always translate the word " plugin " by "plugin", or impose to never translate " Orthotypo ", the name of one of my plugins.
Translation tools : Search and replace
Finally, the "Search and Replace" tool allows you to make replacements in your existing translations.
Weglot: Multilingual SEO
To allow search engines to find the translated pages, Weglot will add data in the header of the sites. These data are in line with the best SEO practices recommended by Google. In this case, it is the method of HTML tags.
Here's what this data looks like. This is a code added on your site pages between the tags :
Weglot : Resources for developers
Weglot has also been designed for developers! Here are the resources at your disposal:
- Turnkey" functions: https://developers.weglot.com/ wordpress/helpers-functions
- All methods to manage texts that remain untranslated: https://developers.weglot.com/ wordpress/filters/translations-filters (Note that you can also contact support for help)
- Theplugin Weglot offers a lot of Hook which allows you to modify its operation: https://developers.weglot.com/ wordpress/filters/other-filters
- Finally, you have different use cases explained here: https://developers.weglot.com/ wordpress/use-cases
- A Slack Weglot Community band: https: //weglot-community.now.sh/