This is the technical support forum for WPML - the multilingual WordPress plugin.
Tagged: Translating a theme
|May 4, 2018 at 12:53 pm #1975296|
It's the first time I'm working with wpml and maybe I made a mistake…
I installed wpml and already finished the string translation of the parent theme. Now I noticed I forgot to translate some of my sentences in the child theme. Those words and sentences don't appear in the string translation.
I read about installing the configuration file into the child theme https://wpml.org/2016/03/create-multilingual-child-theme/
Is this what I have to do now?
But I'm not sure about what to do exactly after uploading this .xml file into the child Theme root.
As you wrote, I should delete the wmpl-configuration.xml file in the parent theme root.
The string translations I already made are inside the DE_de.po / EN_en.po file in the languages folder, right? Don't they get lost if I'm deleting the configuration file?
Where will the translations of the chlild theme be safed – will I have another language folder inside child theme or will they be safed inside the existing language files of the parent theme?
What else will I have to do in the WPML Section of the Website after uploading the configuration file?
Tanks for your help
|May 7, 2018 at 9:32 am #2007119|
Languages: English (English ) Spanish (Español )
Timezone: Europe/Madrid (GMT+02:00)
1. Technical Information on you environment
Question: Where did you enter these "sentences"? Are these sentences that you added to a configuration panel within the dashboard (e.g. theme options?).
Or are these "sentences" coming from a new template php file that you have created fro your child theme?
3. .po/.mo files
Short answer: No. The de_DE.mo / en_EN.mo files found in the global languages directory (..wp-content/languages/ ) ususally hold the WORDPRESS localization strings.
These are NOT **your** translations. Each time your update your theme/plugin, this file will be overwritten.
If you want to retain your OWN translations, the file should be placed here:
You can use the delivered .po files from your theme/plugin author to fill in the String Translation table by using the import/export tool found at the bottom right corner of the WPML -> String Translations panel.
Alternatively, you can have String Translations use the .mo file by moving it to the directory I already indicated above (e.g. For themes: /wp-content/languages/themes/my-theme-xx_XX.mo) and then setting the WPML configuration here:
- Translate themes and plugins using WPML's String Translation and always load .mo files as backup (this allows you to make changes to the existing translations via String Translation)
- Don't use String Translation to translate themes and plugins (just use the .mo files and don´t check the String Translation table for translations).
4. Where will the translations of the chlild theme be saved?
The files, as discussed above, are files delivered by your theme/plugin author and will be refreshed/overwritten each time you update the theme/plugin.
I wait for your answer to Point 2 above to best advise you on how to get the missing strings to appear in your String Translation table.
The topic ‘[Closed] Translating child theme with already existing translation of parent theme’ is closed to new replies.