This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Yvette 1 year, 5 months ago.

Assigned support staff: Yvette.

Author Posts
May 4, 2018 at 12:53 pm #1975296

monikaG-3

Hi

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

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hello

1. Technical Information on you environment
Could you please provide information about your environment by following thsese steps: http://wpml.org/faq/provide-debug-information-faster-support/

2. Clarification
You wrote: ".. I forgot to translate some of my sentences in the child theme. Those words and sentences don't appear in the string translation..."

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
You wrote: "..The string translations I already made are inside the DE_de.po / EN_en.po file in the languages folder, right? ..."

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.

Longer Answer:
The .mo/.po files found in the ../wp-contents/themes/yourthemename/languages directory are the translations already created/delivered by the theme/plugin author.

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:
For plugins: /wp-content/languages/plugins/my-plugin-xx_XX.mo
For themes: /wp-content/languages/themes/my-theme-xx_XX.mo
The ‘my-plugin’ and ‘my-theme’ being the textdomain of the plugin/theme (usually found in the plugin readme.txt or the theme style.css at the top). You would replace the "xx_XX" with the target language locale for each language like "de_DE".

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:
WPML -> Theme and plugins localization -> Localization options:

- 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?
Unless you use the export tool within the String Translation table, your string translations will be saved in the database.

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.