Some texts in our theme are hard-coded, like back and next buttons or labels days, hours, minutes from the countdown. You can't find an option to edit them on the wp-admin dashboard. So how we can customize them without modifying our theme? The solution is simple. We need to translate string from our theme. So if we want "No upcoming events scheduled yet. Stay tuned!" becomes "We are in vacation for two years", we need to make a english translation.
How to do?
- 1. Download and Install PoEdit software: https://poedit.net/
- 2. Open Poedit and open file /wp-content/themes/croma/languages/croma.pot.
- 3. Click on edit and find, and search for the string you want to modify.
- 4. If you don't find the string, please open a /wp-content/plugins/croma-music/languages/croma-music.pot and repeat step 3.
- 5. When you have find in which file is located the string please click on create new translation.
- 6. Select the same language selected in your wordpress.
If you are not sure which language is set to your wordpress, please go to wp-admin>setting>general.
- 7. Find your string again and fill the translation field with your new string.
- 8. Click on save. It is important to locate your new files in /wp-content/languages. If the modification is from our plugin Croma-music, you need to save file in /wp-content/languages/plugins and the file name should start with "croma-music-". Exemple: "croma-music-en_US.po".
- When we save the po file, a .mo file will be automatically generate. The mo file is the file read by wordpress.
- If you want to modify more then one string, use the same po file.
*If you want to know more about translation, please read our documentation How to translate the theme in your own language ?