In this tutorial, we will provide simple instructions and key points to explain how to translate your “Rooms” (add multiple language versions for each “Room”) using the third-party plugin WPML.
WPML Installation & Set Up
Please follow the steps in this chapter of the tutorial: Getting started with WPML and WPML’s Set-up Wizard.
And then check out this tutorial to get some basic and general understanding about using WPML: Create a Bilingual / Multilingual site with WPML.
Translating the Custom Post Type: Room
- Navigating to WPML > Settings > Post Types Translation, find Rooms, make sure it is Translatable.
- Then you can navigate to Rooms > All Rooms, you will see a column with flags. Click on the “+” button of the language you are about to translate the room post to. For the translated room posts, the “+” icon will change to a pencil icon. Click on the pencil icon if you need to modify your translation.
When translating a room post, you can edit and add all content just like creating a room post. Not all content needs to be translated one-to-one with other language versions. For example, the body content, you can use the WordPress editor or Elementor to edit any room post in a certain language version, the content is entirely up to you.
In the following subsections, we will briefly introduce how to use WPM to translate some special elements related to room information.
Translating Room Type
- Navigating to WPML > Settings > Taxonomies Translation, find Room Type, make sure it is Translatable.
- Navigate to Rooms > Room Type. Create some room types for the main language first. You will see a notification “Translating Room Type? Use the Room Type translation table for easier translation.” Click on the link.
- On the “Taxonomy Translation” page, you will see the existing room types, click on “+” to add a translation for a room type. The “pen” icon means that a translation exists, and click on it allows you to edit the translation.
- After clicking the “+” icon, the “Term translation” window will pop up. Then you can add the translation and click “Save”.
- Then when you edit the German version of a room post, in the “Room Settings” panel > “General” > “Room Type“, you can add “Zimmer” as its room type.
Room Facilities
We suggest not translating the room facilities – please refer to the screenshot below. You can create room facilities for all language ( not for a specific language ). And then enable the facilities and change labels when editing each room.
Navigating to WPML > Settings > Taxonomies Translation, find Room Facility, make sure it is Not translatable.
Extra Services
- Navigating to WPML > Settings > Taxonomies Translation, find Extra Services, make sure it is Translatable.
- Navigate to Rooms > Extra Services. Select a language in the top admin bar, and then create some Extra Services for this language.
- Select another language in the top admin bar and create Extra Services for that language. Repeat this step until you have created Extra Services for each language.
- When you are editing a room post in a certain language, in “Room Settings” > “Extra Services“, you can see the “Extra Services” you have created in that language version. Just select the items you want to display on the room post page.