The implementation of future-proof and performant multilingual projects is easy with the plugins MultilingualPress Pro and MultilingualPress. We will show you, how to add new languages to your website – step by step.
Our two plugins will allow the simple and future-proof administration of multiple languages, as they are based on the WordPress feature Multisite. A preconfigured Multisite is therefore prerequisite. You will learn how to do that and how to operate it in the first part of our tutorial.
Important: Since a Multisite will affect the actual structure of your blog, we strongly recommend verifying the installation on a separate test system. That will also allow you to familiarize yourself with the MultilingualPress features without your customers becoming Guinea pigs.
Installing MultilingualPress PRO
The following steps are described from the viewpoint of MultilingualPress PRO. They will help you to install the free version as well – the only difference being that some features will not be available.
Once you have set up Multisite, the installation occurs as follows:
- Unzip the plugin package on your machine. Upload the sub-folder “multilingual-press-pro” via (S)FTP to the directory /wp-content/plugins/ of your WordPress installation.
- Alternatively: In the central dashboard of your Multisite environment, go to Plugins → Add New → Upload Plugin. There you can select the ZIP file and install it directly.
- Confirm “Activate for all sites”. (If you are uploading via FTP: Go to Plugins and click the relevant link under MultilingualPress Pro.)
- Enter your license key in the Plugins section, and click “Enable” (for MultilingualPress Pro). You will find the license key in your MarketPress customer area under “Downloads”.
You can adjust the functionality of your plugin to your specific requirements under Settings → MultilingualPress (in the PRO version). Generally, however, the default settings will suffice:
- User Backend Language: With this option selected, users can select their own settings as to which language they want the backend displayed. To do so, the relevant WordPress language files must be installed.
- The Custom Post Type Translator can be used for translating – as the name implies – WordPress custom post types (user-defined content and file structures) of where these are to be displayed in a different language on each site. Provided the option is enabled, you will have an additional settings check box displayed under your post types.
Important: Make sure to register your post types in a network-enabled plugin (or at least on the main site) if the option is activated, but your post types are not found. Once they are displayed, you can enable dynamic permalinks if MultilingualPress PRO cannot find the right URLs.
- The Advanced Translator allow you to use a WYSIWYG editor for the translation of blogposts, pages, etc. Some few themes or plugins have difficulties with working with multiple visual editors. The MultilingualPress Editor can then be disabled at that point.
- Quicklink: Quicklinks allow the direct integration of links to other language versions in a post. That can be particularly helpful if you don’t use a sidebar or widgets in your theme to display the language selector (more about that in a bit). If enabled, the feature allows you to specify where in the post your quicklinks should be displayed.
- The HTTP Redirect function in MultilingualPress is a powerful feature to direct your readers automatically to the correct language version. That too we will be looking at a little later. You can disable forwarding here if you don’t want that to happen.
- Trasher: MultilingualPress will delete the linked post in other languages as well if you move a post to the trash with this option enabled. The same applies for pages and for custom post-type elements.
Creating a New Site or New Language Version
Let’s say you want to add an English language version to your Multisite. This is how it’s done (the example used is a Multisite on sub-directory level):
- Go to Sites in the central dashboard. (Our Multisite article will explain the difference between the central dashboard and the sub-dashboard.)
- Existing Multisite sites can be edited here, and new ones can be added. Simply click the relevant button “Add New”.
- The template for creating a new site will open:
- In our example here, the Site Address will be “en”. The English language version of your blog would then be available via the URL http://myblog.com/en/. You can configure the Site Title and Admin Email in whatever way you want.
Important: A new user allocated to the site will be created automatically if you use a different email address than your existing admin or other user address. That would make the administrative management of your Multisite unnecessarily complex. That is why you should ideally leave this field empty. Unless, of course, you want to have every site in your Multisite administered by separate people.
- You can now select the language options for the site in the MultilingualPress section:
- First select the Language of your new site, in this case “English/English”. Via the Alternative Language Title, you can rename the language for the frontend, for example “Swiss German” instead of “German”.
- The option Relationships only comes to bear, once you create sites with multiple languages. It will help define what additional editors or language variants will appear on your site for translations. That means that you decide, which languages can be translated in what way by your authors.
- If you select an existing site for Based on site, then the posts, attachments, plugin/theme settings, categories, tags, and custom taxonomies will be applied to the new site (PRO version).
Important: It is therefore a very useful feature that allows you to duplicate similar sites without having to build them again from scratch. You should, however, verify the exact impact on your plugins, duplicate site content, logics conditions of your system, etc. on a test system first, before going live.
As a final step you click “Add Site”. The new site is now accessible via “My Sites”. It will be renamed with the site title you specified earlier. You can access and manage it from here.
Creating a link between the languages
Before you can start with the translation of your posts, you still need to link your original (e.g. German language) blog to the new (English language) site.
Important: MultilingualPress does NOT automatically create links. You can therefore decide for every newly added language, whether the posts on that blog should be translatable into the other languages of your sites, or not.
You create a link as follows:
- Go to Sites in the central dashboard. In your original site or original blog (in this case “/”), click “Edit”:
- Switch to the tab MultilingualPress:
- Select the Language of your base site (“German/Deutsch”). Under Flag image URL, you can optionally store a graphic icon or a country flag for each language, which will then be displayed in the language selector.
- Under Relationships you can now specify the languages into which the German posts should be translatable. In this case: “EN”.
Clicking “Save Changes” will complete the linking process.
If you now call up a post or a page of your main site or main blog, then you will see an additional field below the editor:
- This is where you enter the translated title and the translated text of the post.
Tip: The editor will apply the original post to the field if you click Copy Source Post. That is particularly useful, because it will also apply any HTML elements like embedded images, lists, font and formatting, etc. from the original post. The only thing left for you is to translate the actual text and the meta data outside these HTML elements – but the target post will look exactly like the original.
Any external translation provider you work with, will ideally also utilize the HTML from the editor of the source post. Simply copy/paste the result in the MultilingualPress field – finished.
- Enabling the relevant check box will allow you to copy the post image of the source post. That will then also be applied to the translated version. However, the editor will overwrite existing post images if the target post exists already. Alternatively, you can specify a different post image (more about that in a minute) for the translated post, for example if text included in the image needs to be translated as well.
- Change Taxonomies allows you to specify the target category of the translated post.
- If you now update or publish the source post (via the standard box in WordPress “Publish” at the top left) to save your input, then the translation will not automatically “go live”. Instead, it will first be created as a draft in the English language site. Go to the dashboard of the EN site, and there go to Posts.
- There you can view, edit (it will be synchronized with the translated content on the source site), and publish the translated post. Only then will it become visible for users, and the language selector will only then lead to the relevantly translated content.
Tip: This process allows a separate publication of your original posts and their translations, very handy if you don’t have translations available for all posts as yet. The following procedure has proven generally successful: You create the first translation in the original post, or copy/paste the entire source code (“Copy Source Post”); then you switch to the EN site, and complete the text there.
Integrating a Language Selector
You can now enable the language selector, which will allow your visitors to toggle between different languages – for example in the sidebar of your blog:
Please note that the exact representation will depend on your theme. This is how you set it up:
- Go to the dashboard of the site, where you want to integrate the language selector (you have to do that for each site individually, in this case for the DE site and the EN site).
- Go to Appearance → Widgets.
- Under “Available Widgets” you will now see the new widget “Language Switcher”. Drag & drop it in a sidebar section or other widget area of your choice. Then you can adjust the appearance of the language selector:
- The Title governs the header displayed above the language selector (e.g. “Change Language”). You can also leave this header empty if you prefer.
- Link Text allows you to decide, whether only the name of the language and/or a national flag will be displayed. Alternatively you can have the international language code displayed. These are the tokens designated for each language in accordance with ISO 639-1, e.g. “EN” for English, and “DE” for German.
- If the option Show Current Site is enabled, then a reference to the currently displayed language will also be included.
- Show links for translated content only: MultilingualPress PRO will in this case verify, whether the translation for a post or a page is available. Only then can the relevant language be selected.
Don’t forget to click “Save” in the end. The language selector should now be visible in your blog or online shop.
MultilingualPress Language Administration
Our plugin will try to determine the right language version to display for every individual visitor to your blog. It also defines the sequence of items in the language selector. You can, however, influence the logic behind it yourself as well.
Access the MultilingualPress Language Administration module, which you will find in the central dashboard under Settings → Language Manager:
Here you will find the languages you want to offer to your readers, and you can set them to higher priority values. The original language should always be set to “10”, and the translations to slightly lower values – depending on their quality, but also in accordance with their importance to your visitors.
This post will demonstrate how to go about prioritizing.
Quite a few WordPress users shy away from setting up a Multisite environment because of lack of knowledge. But once you have familiarized yourself with the workings of Multisite by MultilingualPress PRO, you will quickly discover its efficiency. Even the most complex and large international WordPress projects can be implemented with it – performant and future-proof.
New Plugin: Slack Connector - Connect WordPress, WooCommerce and Slackby Michael Firnkes
Initially we merely wanted to optimize our own Slack-processes. With automated notifications from our MarkettPress shop, the blog and our forums. The resul ...Read more
Inpsyde is the first WordPress.com VIP partner in Germanyby Michael Firnkes
Automattic has given us the title of WordPress.com VIP Service Partner, the first in Germany, Austria and Switzerland. Worldwide, there are only eleven com ...Read more
Inpsyde is a WooExperts Gold Partner of WooCommerceby Michael Firnkes
A few weeks ago, Inpsyde GmbH with MarketPress became a certified WooExperts Gold Partner. This is confirmation from WooThemes of our agency’s know-h ...Read more
BackWPup Pro: Secure WordPress Backup with Google Driveby Michael Firnkes
The Pro version of our BackWPup plugin supports the backup of WordPress databases and files to Google Drive. But how do you set something like that up? And ...Read more