CozyStay Documentation

Translating Theme with Loco Translate

October 9, 2023

You can install this third-party plugin on your website and translate the theme text directly from your website dashboardLoco Translate.

Please read the plugin’s documentation for the detailed user guide:

Get started
When using Loco Translate, on your website dashboard, please go to “Loco Translate” > “Themes” > find “CozyStay” (or “CozyStay Child”, depending on which theme is activated). Click on “CozyStay” then you will be able to add a new language, or edit the translation of an existing language.
Choose a location for translations

When “Initializing new translations”, please find “Choose a location”: you will choose where to save your translation file. (More details can be find here.)

  • Custom – Recommended. This is Loco’s protected folder under “wp-content/languages/loco/” which is safe from automatic updates. If this folder doesn’t exist you may need to create it and ensure it has the correct permissions.
  • System – Files saved here can be overwritten by WordPress’s own language installer. If you have disabled WordPress automatic translation updates, you can select this option.
  • Author – Please do not select this option. If you select this option, your translation file will be saved in the theme folder. Every time you update the theme, all the files in the theme folder will be overwritten, which will cause your translation to be lost.
“What if I choose the incorrect save location for the translations?”

You can change the location for translations. On the editor screen of a language, please click the “Relocate” tab, there you can change the location, and then click “Move Files”.

Translate the strings of the theme

Once on the editor screen you’ll see all the strings included in the .pot file of the theme. The basics of the editor should be fairly intuitive. Select the English string at the top and enter your translation in the pane at the bottom. You just need to enter a translation and save it.

  1. 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.
  2. You can enter text in the “Filter translations” field to search for specific source text that you want to translate.
  3. Select the source text (the English string at the top) and enter the corresponding translation.
  4. Click the “Save” button to save your work.
Translate the strings of the “Cozystay Core” plugin

According to WordPress coding standards, some features of CozyStay are included in the theme’s core plugin “CozyStay Core”. For example, the theme’s built-in booking form, etc. Therefore, when translating text related to these features, the “CozyStay Coreplugin needs to be translated. The translation process is the same as the process of translating text in the theme introduced above.

Please follow the steps below:

  1. On your website dashboard, please go to “Loco Translate” > “Plugins” > find “CozyStay Core”.
  2. Then please add a new language.
  3. 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.)
  4. Then you can start translating.
  5. 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.
  6. You can enter text in the “Filter translations” field to search for specific source text that you want to translate.
  7. Select the source text (the English string at the top) and enter the corresponding translation.
  8. Click the “Save” button to save your work.

Have questions or problems with Loco Translate?

Please kindly note: Loco Translate is a third-party plugin created and maintained by other authors (not us), when you need help with this plugin, please contact the author of the plugin. This is the support forum for “Loco Translate”.

Close
Close