CozyStay Documentation

How to translate text in theme’s built-in booking form

March 13, 2024

The theme’s built-in booking form is displayed on the single room page. Since this part of the functionality must be included in the plugin rather than the theme according to WordPress coding standards, the text here needs to be translated by translating the text in the “CozyStay Core” plugin.

If you want to translate the text in the Room Search/Filter Form, please also follow the steps below.

  1. Please install this third-party plugin on your website: Loco Translate. With this plugin, you can translate the theme & plugin text directly from your website dashboard.
  2. After installing and activating this plugin, on your website dashboard, please go to “Loco Translate” > “Plugins” > find “CozyStay Core”.
  3. Then please add a new language.
  4. When “Initializing new translations”, please find “Choose a location”: you will choose where to save your translation file. It is recommended to select “Custom“. (More details can be find here.)
  5. Then you can start translating.
  6. New strings may be added when the theme is updated, so please click the “Sync” button each time you translate to synchronize the newly added strings to the “Source Text” library.
  7. You can enter text in the “Filter translations” field to search for specific source text that you want to translate.
  8. Select the source text (the English string at the top) and enter the corresponding translation.
  9. Click the “Save” button to save your work.
  10. Please note that in addition to translating “Room” “Rooms” “Adult” “Adults” “Child” and “Children”, since “1 Room”, “1 Adult” and “0 Child” are the initial status prompts included in the form, so please also search for these phrases and translate them. Just like the process shown in this screencast video:
Close
Close