The WPML plugin will help you to translate your website into different languages. Follow the steps described in this article to set up the plugin.
Activate the WPML plugin. Follow Dashboard > Plugins and click Activate under the WPML items.
After that click on Configure WPML to finish the plugin installation.
To manage languages, go to WPML > Languages.
The languages section allows you to make a WordPress site multilingual.
When you configure WPML for the first time, you need to choose the language of existing content. Select the language of your current website content in the Current Content Language section.
In the next step (Translation languages) add more languages to the site. Mark the languages you want to add. Then click on the Next button.
In order to let site visitors select their language, you can add a language switcher to the theme.
WPML’s standard language switchers include a drop-down languages list, a list of languages for the site’s footer, and a language switcher for the menu.
Click the “Add New Language Switcher to Menu” button to add the language switcher to the menu.
On the screen New Menu Language Switcher, select the position, style of menu items, specify what to add to the language switcher and choose the colors. Then click the "Save" button.
Here you can see a preview of your menu and position and you can manage them at any time. Click on the Next button to proceed to the further step.
Select the first option for compatibility reporting.
Paste the site key that you can find on your wpml.org account page and click the Register button. if you don't have a site key, then click the button to generate a key for this site.
After a successful setup, a drop-down list of the selected languages will appear in the area of your dashboard.
WPML lets you choose to format your site’s language URLs using a language argument in the URL, in virtual folders, or different domains (or sub-domains). Internally, all languages are saved in one WordPress database, but for visitors languages can appear to be on different sites.
You can choose the format you want when setting up WPML for the first time. If you would like to change it to a different format after setting up WPML, you can do so by going to WPML > Languages and scrolling to the Language URL format.
You can choose from the following options:
Different languages in directories
A different domain per language
To set up your languages in directories, Apache’s rewrite module must be enabled. If you do not have access to your server’s settings, please contact your hosting provider to request them to enable this.
You can place different languages in completely independent domains. For example:
Don't forget to re-save your permalink settings after choosing your language URL format.
Now your site is ready for content translation.
Go to the WPML > Translation Management page to send content for translation.
Select translation steps. Choose who will translate the site and what tool can be used for that.
Once selected, finish the setup by clicking the Done button.
Next, select pages and settings for translation.
Select items for translation, specify the language
Choose pages for translations
Select the translation options - Translate
Add selected content to the translation basket
In order to translate the selected page click on the Send all items for translation button from WPML > Translation management > Translate Basket.
To translate your selected page, go to WPML > Translation Queue.
You can translate your page into another language one by one using the translation buttons in the translation queue.
After clicking the translate button from the translation queue, the Advanced Translation Editor will open.
After the translation, click on the Complete button.
After the translation, the complete status will appear in the translation queue table.
The home page has now been fully translated into Portuguese.
If you visit your homepage the languages from the WPML plugin will show up and you can choose the English version of your site or the Portuguese version of your site.Portuguese version of the site
Besides this method, there is also a simple method to translate pages, for example, if you have a small number of pages, then you can make translations directly from the page, duplicating content.
For example, we will translate a page About us into another language directly from the page.
Just edit the page, then mark the duplicate options in the translation editor form, then click the duplicate button.
After duplication, the selected language will disappear. Press the Update button to apply the change to the page.
To distinguish this page from a page to another language we simply add text to the page.
On this page, if you choose the English language, the English version of the page will be opened. If you choose another language the default content that is duplicated from the English version will be opened and you will be able to change the content for another language easily to your own.
In order to make courses translatable, you need to choose the translatable option for them. Go to WPML > Settings > Post types Translation
Then, you need to enter a static slug course for your languages so that they work with the course archive page. Then save your changes.
Please don't forget to re-save your permalink settings
Now you can translate your courses as regular pages.
Edit courses and duplicate them into other languages and translate your content to your language.
To translate the Register and Modal windows, you need to go to WPML > Languages. In the section called Languages filtering for AJAX operations mark the option "Store a language cookie to support language filtering for AJAX" and save the settings.
After configuring the WPML, you need to specify LMS Pages for their correct work. You will get the notice, asking you to specify the pages. Click on the Open Settings button.
You will be redirected to the LMS Settings (LMS Pages) where you can generate the pages. Click the Generate Pages button to generate the pages automatically. After the operation, you should re-save permalinks.