How to translate your WordPress website?
Translating his WordPress website gives you a huge competitive advantage. Indeed, allowing each of your clients to read you in their national language brings a plus to your business. For example, imagine that you originally propose content in French, and users who speak English, Spanish, or Chinese can read you. This could increase your visibility and generate revenue. In this article, we will see how to translate a WordPress website. We will talk about two approaches: the use of extensions (plugins) and the approach without plugins.
How to translate a WordPress website with a plugin.
The WordPress community offers various plugins that can help you translate your website. Indeed, these extensions allow you to translate fairly quickly in one or more languages. It is also essential to note that some extensions are free and others are available as premium.
Below are some relatively popular extensions.
1 – WPML
It is a relatively popular extension online. Indeed, it offers the possibility of translating your website in hours. With WPML, you will, for example, have access to automatic translation based on Google Translate and DeepL Translator. In addition, it should be noted that this is a free extension. You must therefore subscribe to a one-year subscription that can vary between $39 USD and $199 USD.
Some peculiarities of WPML
It provides numerous features and benefits for site owners who wish to offer content in different languages. Here are some special features of WPML:
- Ease of Use: WPML is designed to be easy to install and use, even for non-developers. Indeed, the user interface is intuitive, allowing you to manage and translate content effortlessly.
- Compatibility: WPML is compatible with most WordPress themes and plugins. This ensures that multilingual features integrate seamlessly with your site.
- Machine translation: WPML offers a machine translation option to help with the fast translation of content. This can be useful to get basic translations, which can then be tweaked manually.
- Translator management: WPML allows you to manage professional or internal translators directly from the plugin interface. This way, you can assign tasks to them and track their progress, making it easier to manage translations.
- Multilingual SEO: WPML is optimized for SEO in all languages. For example, it generates search engine-friendly URLs, and appropriate hreflang tags, and supports configuring meta tags for each language.
If you would like to know more about the WPML extension, we invite you to visit their website.
2 – Polylang
Polylang is another popular plugin to create multilingual sites on WordPress. Moreover, it is known for its simplicity and lightness. In fact, it’s a great alternative for those looking for a simpler and cheaper multilingual solution than WPML. Here are some Polylang features:
- Ease of use: Polylang is designed to be simple and easy to use. Furthermore, the installation and configuration of the plugin are quick, and the user interface is clear and intuitive. This allows easy management of translations.
- Compatibility: Polylang is compatible with most WordPress themes and plugins.
- Language support: Polylang supports an unlimited number of languages and offers a choice of over 50 preconfigured languages. You can also add custom languages if needed.
- Multilingual SEO: Polylang is SEO optimized in all languages, with search engine friendly URLs and support for hreflang tags.
- Translation flexibility: Polylang translates articles, pages, categories, tags, menus, and widgets. It also offers the possibility to define different languages for content and menus, offering great flexibility to manage your multilingual site.
- Localization support: Polylang supports the localization of themes and plugins. This allows you to translate static text strings used in your theme or plugin code.
- Free and premium version: Polylang offers a free version with basic features for multilingual sites and a premium version. Polylang Pro adds additional features such as support for custom content types, translated slugs, and custom fields.
3 – Weglot
Weglot is a cloud-based translation plugin for WordPress. It allows you to translate your website into multiple languages without any programming. You can therefore translate all your content, including pages, articles, and menus.
Weglot is a WordPress translation plugin that allows you to create and manage multilingual sites quickly and easily. However, Weglot differs from other translation plugins by offering a combination of machine and manual translations, as well as seamless integration with most WordPress themes and plugins. It also includes a language selector and SEO support.
Here are some features and benefits of Weglot:
- Quick Setup: In minutes, you can install and start translating your site into different languages.
- Machine translation: Weglot offers machine translations for over 100 languages. Indeed, the platform uses leading machine translation services, such as Google Translate and DeepL.
- Manual translations: In addition to automatic translations, Weglot also allows editing and improving translations manually. You must log in to the Weglot website to do the manual translation.
- Translation Management Interface: It provides a user-friendly translation management interface that allows you to view, edit and manage your site’s translations in one place.
- Multilingual SEO: The extension allows you to have search engine-friendly URLs, proper hreflang tags, and supporting meta tag setup for each language.
- Customer Support: Weglot offers responsive and professional customer support to help resolve issues and answer user questions.
It is, however, important to note that the annual cost of using Weglot can be very high compared to other plugins.
Translate your website without extensions or plugins
If you want to use programming or another approach, we will recommend multi-site WordPress (WordPress network) or PHP programming (Advanced knowledge).
Multi-site WordPress (WordPress network)
WordPress Network, also known as WordPress Multisite, is a feature that allows multiple WordPress sites to be managed from a single WordPress installation. This is especially useful for organizations, companies, or individuals who manage multiple websites and want to centralize the management of updates, themes, and extensions.
To create a WordPress Multisite network, follow these steps:
- Back up your site: Before you begin, make sure to back up your existing website, in case you run into any issues while setting up the network.
- Enable Multisite: Open the
wp-config.phpfile located in the root directory of your WordPress installation. Add the following line just above the line
/* That's all, stop editing! Happy publishing. */:
Save the file and upload it again to your server.
define( 'WP_ALLOW_MULTISITE', true );
- Configure the network: Login to your WordPress dashboard. Go to Tools > Network Configuration. Choose between “Subdomains” or “Subdirectories” for your network structure. Fill in the other required information and click “Install”.
.htaccessfiles: WordPress will provide you with code to add to your
.htaccessfiles. Follow the instructions and add the provided code.
- Log in again: Once the changes have been made, log out and log back into your WordPress dashboard. You should now see a new “My Sites” menu item at the top left of the dashboard.
- Manage your sites: To add or manage sites, go to “My sites” > “Network administration” > “Sites”. Here you can add, edit and manage all sites in your network.
Using WordPress Multisite for Translation
To use this feature for translation, you need to create content and duplicate it to other languages in the network. Indeed, the WordPress network allows you to manage (almost) independently the languages of your site. It is however essential to note that you may need to do some fiddling to connect the content. For this fact, having knowledge of PHP can be important. You will find more resources on wordPress.org explaining how to install wordpress Multisite.
Translate your website without Extension or WordPress Network
If you prefer to use a PHP or .htaccess script to switch between languages, you can use the following approach:
- Create a subdirectory for each language you want to support (e.g., /en/ for English, /es/ for Spanish, etc.).
- Copy all of your website files into each language subdirectory.
- Manually translate the content of each page into the corresponding language.
- Use a PHP script or .htaccess file to redirect users to the appropriate language subdirectory based on their browser language or a language switcher on your website.
Here is an example PHP script that detects the browser language and redirects users to the appropriate language subdirectory: