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 thread is resolved. Here is a description of the problem and solution.

Problem:
Slides from Shop Isle are not being translated
Solution:
Go to the WPML -> Settings page and click the Custom XML Configuration tab.

<wpml-config>
    <admin-texts>
        <key name="theme_mods_shop-isle-baptizw">
            <key name="shop_isle_slider"/></key>
    </admin-texts>
</wpml-config>

This created a new string (JSON data as it seems) within admin_texts_theme_mods_shop-isle-baptizw domain and [theme_mods_shop-isle-baptizw]shop_isle_slider context. Now when you translate something directly within this JSON data, it works, but you have to be careful regarding quotes.
Relevant Documentation:
https://wpml.org/documentation/support/language-configuration-files/overriding-language-configuration-files/

This topic contains 7 replies, has 2 voices.

Last updated by thorsetenM 5 months ago.

Assigned support staff: Bruno Kos.

Author Posts
May 22, 2019 at 4:28 am

thorsetenM

I am trying to:
Translate the slides on my front page.

Link to a page where the issue can be seen:
hidden link

I expected to see:
on the German version in the first slide about baptism dresses the German translation

Instead, I got:
the original English

May 22, 2019 at 7:49 am #3862643

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support!

I was able to find one older thread about this only - can you check this?
https://wpml.org/forums/topic/string-translations-not-saved/page/2/#post-1303830

I am not sure if that code is still valid though, since almost 2 years passed:
hidden link

It seems like that was/is compatibility issue that we would need to debug (in case that the above does not work).

Regards,
Bruno Kos

May 22, 2019 at 1:23 pm #3866089

thorsetenM

I deleted all entries concerning the sliders in the string translation. Then I followed the instruction to the letter. I have 5 sliders on the page, I changed all of them and published them again. The one slide domain shown in the screen shot is the only one created. If I put in a translation into this one, this same translation is then shown in all slides of the translated language.
Any other idea?
I changed the content-slider.php back to the original from the theme.

May 22, 2019 at 2:10 pm
May 22, 2019 at 8:22 pm #3868983

thorsetenM

Hi Bruno,
I did as you asked. I copied the child theme and theme from my site to the demo site, the orbit-fox plugin (the shop isle addition so that you get the slider), threw an error when I just copied it, so I installed the plugin the normal way.
I changed the texts of the three slides that where in the theme, but the changed text does not appear in the string translation.
Tell me if you need something else from me.
Cheers,
Thorsten

May 23, 2019 at 9:04 am #3872761

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

I may have a found a way - not the prettiest interface to translate the content, but it works as it seems. For example, check the second slide on German:
hidden link

or the first one in Greek:
hidden link

I removed some strings from String Translation (strings and translations for the first slider) and added this code eventually:

<wpml-config>
    <admin-texts>
        <key name="theme_mods_shop-isle-baptizw">
            <key name="shop_isle_slider"/></key>
    </admin-texts>
</wpml-config>

This created a new string (JSON data as it seems) within admin_texts_theme_mods_shop-isle-baptizw domain and [theme_mods_shop-isle-baptizw]shop_isle_slider context. Now when you translate something directly within this JSON data, it works, but you have to be careful regarding quotes. I am sorry I don't have a prettier solution for you, but given how this theme stores this data, this one seems to be the only we can use.

Regards,
Bruno Kos

May 23, 2019 at 9:28 am #3872939

thorsetenM

Hi Bruno,
thanks for this solution, it seems to work. But not really nice is it? And now we have 45 new entries under the newly created domain 'admin_texts_theme_mods_shop-isle-baptizw' in string translation.

And now we ignore 'Slide shop_isle_slider' domain, right?

What is strange is that not too long ago it worked. I had an domain entry for every slide and could translate what I wanted. Sadly I can not say when it stopped working.

Could it be that something is being blocked that WPML string translation needs to see this data?

Cheers,
Thorsten

May 23, 2019 at 9:38 am #3873071

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

These are only strings that are used in the theme (the one ones) and you don't have to worry about them.

And thus we ignore 'Slide shop_isle_slider' domain, right?

Yes, that's the plan.

Could it be that something is being blocked that WPML string translation needs to see this data?

I'd like to give you an answer to this, but it would require a more through debugging (our compatibility did this 2 years ago on that other ticket in fact), but most likely it is because of JSON data coupled with theme mods as the ways this theme stores data. Some of the feedback back then was:

"In theory, it would work correctly simply by removing the calls to json_encode and json_decode but they surely have their reasons for this. Probably to get around databases with incorrect encoding."

So there's nothing else I can add here.

Regards,
Bruno Kos

May 23, 2019 at 9:55 am #3873199

thorsetenM

My issue is resolved now. Thank you!