When you think about translating your content, you may think about the page “title” and “body”. However, fully translated content requires more attention. In this document, we explain what you need to know before starting to translate your content and how to handle the different elements in your sites.
WPML offers you different methods, which address different stages of the site and different needs.
The simplest way to translate content is by clicking on the ‘+’ icons (add translation) when editing content. Using this method, you will be editing translations in the same way you edit the content in the original language of the site. We call this method manual translation. When you use manual translation, you need to take care of all technical issues related to translation. This is why manual translation is best suited for developers who are building sites and only create small amounts of content.
When you need to manage large amounts of content, including its translation, you should look at either using WPML’s Translation Editor or professional translation. Professional translation is available via a growing list of partner translation services. Both these options will take care of all the technical issues related to translation, letting you focus on content only.
You can also let your own translators use desktop CAT tools (programs that translators use as their editors). WPML will export the content as XLIFF, translators will translate content using their dedicated translation editors and return the completed XLIFF files to WPML.
Finally, if you are using page builders, read how to translate content created by page builders.
- Manually creating posts and pages in other languages
- Create translations as new posts or pages using the standard WordPress editor.
- Using the Translation Management module
- Control who’s translating what and give your translators better tools.
- Professional translation by a translation service
- Select your translation vendor and streamline the translation process.
Most WordPress sites use ‘pages’. Pages have parents. For example, the parent page of this page is our main documentation page. When you translate content, you surely want to create the same hierarchy in all languages.
Let’s consider an example:
Page A is the parent of pages B and C. The hierarchy of the translated pages should therefore be:
- Xa < Xb
- Xa < Xc
When you translate content manually, you need to take care of assigning parents yourself. It would be easiest for you to first translate the parent pages, then translate the child pages and assign the parents, as you create the child pages. The ‘page parent’ selector, in the page editor, will only show you pages in the language you are editing.
When you translate using WPML’s Translation Editor or using translation services, WPML takes care of assigning parents for you. The order in which you translate the content is not important. If you translate the children first, as soon as you translate the parents, they will be auto-assigned to the children. Of course, if you translate the parents first, children will have the correct parent assignment as soon as the children are translated.
Remember that you can only assigned ‘published’ pages as the parents of other pages. Also, different post types can have parents. We are using ‘pages’ here only as an example.
Content often includes links to other content inside your site and outside of the site. When you translate content, you want links to go to other content in the same language.
Let’s look at an example of two pages. ‘Page A’ links to ‘page B’ and ‘page B’ links to ‘page A’. Once both pages have been translated, you want Xa to link to Xb and Xb to link to Xa. You don’t want any of the translated content to keep linking to the respective content in the original language.
When you translate content manually, you need to manually create links to translated content.
When you use WPML’s Translation Editor or professional translation, all links are automatically adjusted to content in the same language. In this case, the order in which you translate the content does not matter. In fact, it’s often impossible for you to translate content in the “correct order”, because many pages link to each other.
Your translators don’t need to edit links when they translate. They should only edit link text, but not the link targets (the URLs in the links). When translations complete, WPML scans links in the content and automatically adjusts them to link to content in the same language. This operation is complex, but happens only once and only inside the WordPress admin. Links are adjusted in the database and will be correct when the content is rendered.
You can tell WPML if content should be “translatable” or not. Translatable content means that:
- You will see the controls for manual translation when editing content.
- You can translate the content manually, using WPML’s Translation Editor or using professional translation.
You have two options when setting your content as translatable. One displays only translated posts and pages to the visitors. The other displays the translations but if there are no translations, it displays the content in the original language.
Let’s looks at three examples to illustrate all of this.
If you create a “showcase” custom content type that only includes images and links, there’s nothing to translate. You will want to display the exact same “showcase items” in content in any language. In this case, you should set the “showcase” content to be “not translatable”.
If you create a “services” custom content type that includes titles, description, and additional text fields, you want to make these services “Translatable – only show translated items”. In this case, you will be able to translate services and only translated services will display in different languages. Until you translate a service, it will not display.
Lastly, you might have a site with a big amount of “products” and it might not be practical to translate them all. In this case, you can make these products “Translatable – use translation if available or fallback to original language”. If there is no translation for a “product”, users will see its contents in the original language, but the rest of the site, like menus and widgets, will be displayed using the language of their preference. You can read more about this on the page about displaying untranslated content in secondary languages.
You can select these options when you edit content (in the Multilingual Content Setup section) and in the Post Types Translation section found on the Multilingual Content Setup tab of the WPML -> Translation Management page.
Most WordPress sites include custom fields, many of which require translation. WPML lets you choose how to treat custom fields when translating content.
First, you need to tell WPML which fields require translation. You can do this when editing content, in the Multilingual Content Setup meta box, or from WPML->Translation Management->Multilingual Content Setup->Custom fields translation.
For each custom field, you can choose between:
- Don’t translate
- Copy once
Don’t translate means that WPML will not do anything with this custom field when sending content to translation. You should choose this option for fields that don’t need to appear in the translation.
Copy means that WPML will automatically copy the value of the field from the original content to the translation. This option is good for numeric and boolean fields, which need to have the same value in all languages. For example, a ‘price’ field should have the same value for all translations of a product (providing that you are offering the product for the same price in all languages). This copying will occur in all translation methods (manual translation, WPML’s Translation Editor or professional translation).
Copy once means that WPML will copy the value of custom fields from the original to translations only once when you translate content initially. For example, this is useful when your theme uses custom fields to store per-page settings. This way, you can translate pages and all the settings are automatically applied to the translated content. Then, you can edit the translations and modify these settings per language.
Translate means that WPML will include the field in the content for translation, when using the Translation Editor or professional translation. The translators will see the field as a text field and will need to translate it.
Taxonomy is different than fields, as it’s shared to different content. For example, if your site uses ‘post categories’, the categories are managed centrally (in Posts->Categories) and not unique to each post. You can assign categories to posts, but when you edit a category for a post, you affect the category and not the post.
You can translate all taxonomy that belongs to your site on the WPML -> Taxonomy Translation page.
Alternatively, when you use WPML’s Translation Editor or Professional Translation, you can include taxonomy terms together with the translation of content. When you send content for translation, WPML will automatically include new or updated taxonomy terms. Keep in mind that translating the taxonomy that’s used for one piece of content can change the same taxonomy, when displayed on other content.
Additionally, you can set taxoonomies to be translatable and use the translations if they are available but fallback to the original language if they are not translated. You can read more about this on our page about displaying untranslated content in secondary languages.
Often, when you include images in content, these images will have captions, alt-text and a description. You want all these texts to be translated.
When you use WPML’s Translation Editor or professional translation, these texts are included together with the content. Your translators need to make sure not to break ‘caption’ shortcodes and to translate only the values of the attributes. This way, images will appear in the text with the translated texts.
Additionally, some content uses the WordPress ‘gallery’ shortcodes to display image galleries. This uses the ‘attachment’ mechanism in WordPress, which makes images belong to content. If your content uses galleries, be sure to enable WPML’s Media Translation module. This module will attach the same images to all translated content. This way, the same image files will appear in galleries in all languages.
In order to have fully translated websites, you need to translate the content and all other texts that are found in the theme and active plugins. But that’s not all, you also need to make sure that PHP code that loads and displays content, loads the content in the correct language.
To translate the texts in themes and plugins, read about theme and plugins localization.