CozyStay Documentation

Translating rooms with WPML

October 15, 2024

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

  1. Navigating to WPML > Settings > Post Types Translation, find Rooms, make sure it is Translatable.
  2. 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

  1. Navigating to WPML > Settings > Taxonomies Translation, find Room Type, make sure it is Translatable.
  2. 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.
  3. 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.
  4. After clicking the “+” icon, the “Term translation” window will pop up. Then you can add the translation and click “Save”.
  5. 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.

Change labels when editing each room.

Extra Services

  1. Navigating to WPML > Settings > Taxonomies Translation, find Extra Services, make sure it is Translatable.
  2. Navigate to Rooms > Extra Services. Select a language in the top admin bar, and then create some Extra Services for this language.
  3. 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.
  4. 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.
Close
Close