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:
The user was not able to translate the homepage sections.
Solution:
The user uses PowerPack for storefront, homepage sections are configured as theme options and need to be translated. We can find the strings in admin strings screen and configure some XML similar to the following to make the section translatable.

<wpml-config>
    <admin-texts>
        <key name="theme_mods_storefront-child">
            <key name="sph_hero_heading_text" />
            <key name="sph_hero_text" />
        </key>
    </admin-texts>
</wpml-config>

Relevant Documentation:
https://wpml.org/documentation/getting-started-guide/translating-theme-options/
https://wpml.org/documentation/support/language-configuration-files/

This topic contains 21 replies, has 2 voices.

Last updated by Jamal 1 month, 1 week ago.

Assigned support staff: Jamal.

Author Posts
August 28, 2019 at 9:41 am #4472881

lixuanM

Hey,

Yes, It worked! Thank you so much!

I did not change the password for wp log in, I get an email that the password was changed today, so I deleted the account from my WP.

Can you help me with further questions please?
The home page all titles for each section is not translated and product hero section is not translated either.

August 28, 2019 at 9:44 am #4472893

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Please fill the private details fields after a full site backup. I would like to access the admin area of your site for further checking. Please check the following links for more details about our private information sharing policies.

hidden link

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Best regards,
Jamal

August 28, 2019 at 11:34 am #4473927

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi,

Thank you for the access data.

The homepage section titles are actually theme options defined in the WordPress customizer with the Powerpack plugin. Please follow this article to make them translatable.
https://wpml.org/documentation/getting-started-guide/translating-theme-options/

Let me know if you find any troubles with that.

Best regards,
Jamal

August 29, 2019 at 8:08 am #4478551

lixuanM

Hey,

Thank you for your reply again.

I have followed your instruction and translated those titles, but it does not look like it works.

Can you please help to check a little bit more about it?

August 29, 2019 at 10:51 am #4480309

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

We need actually to translate the theme options registered for the child theme. My apologies for missing this one. Please see the attached image. You will need to make the strings configurable in the child theme options.

Best regards,
Jamal

August 29, 2019 at 11:18 am #4480453

lixuanM

Hey,

What I did was that I translated them in the child theme, but it does not help. Are you able for an alive chat ?

August 29, 2019 at 2:12 pm #4481649

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

The options for the child theme were not configured as translatable, see attached image(admin-strings-keys.png
). This could happen if you have a low MaxInputVars value, the child theme options were so far in the page that may be more than the MaxInputVars.

Alternatively, the strings can be configured through a custom XML configuration. I added the following XML to WPML->Settings->Custom XML Configuration(tab) and made the hero heading text(sph_hero_heading_text) translatable. See the attached image(options-translation.png).

<wpml-config>
    <admin-texts>
		<key name="theme_mods_storefront-child">
			<key name="sph_hero_heading_text" />
		</key>
	</admin-texts>
</wpml-config>

Please, add a line for each key to make it translatable. If I would add the hero text(sph_hero_text) I will use the following code:

<wpml-config>
    <admin-texts>
		<key name="theme_mods_storefront-child">
			<key name="sph_hero_heading_text" />
			<key name="sph_hero_text" />
		</key>
	</admin-texts>
</wpml-config>

I hope this is clear enough to help you configure the other options. Let me know if you find troubles with that.

Best regards,
Jamal

August 29, 2019 at 10:29 pm #4483733

lixuanM

Thank you very very much.

All the section titles are fixed.

But the product hero section is still not translated, Can I use the same code doing it? Or what should I add in the code?

August 30, 2019 at 9:46 am #4485751

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi,

Perfect, I am glad, I could help.

The hero should also be translated similarly, I think that I already configured the hero. I visited the homepage in all languages and It seems to me that the hero is translated(basically a string comparison, I cannot read any of your website languages).
Can you please provide more details about this hero issue? Screenshots? Or what should be in each language? I'll try to understand the issue more deeply and provide a fix.

Best regards,
Jamal

August 30, 2019 at 9:57 am #4485973

lixuanM

Hey there,

Please see the screen short for our danish page.

For this grey bed sett, the language suppose in Danish, but right now it is on Norwegian.

And same issue on our Swedish page.

Thank you

August 30, 2019 at 9:58 am #4486139

lixuanM

The danish language suppose like this. Please see the screen short.

August 30, 2019 at 10:43 am #4486615

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

This section is configured by the Storefront Hero plugin. And is configured under the key "sprh_featured_product" which contains the ID of the product 3000. I translated the plugin to Danish by using machine translation for the remaining string. Then I configured the key to be translated and translated the ID 3000 to the IDs of the translated products. All this did not solve the issue.
I also purged the caches to no avail. All this makes me think that this is a compatibility issue. To confirm that, we will need to reproduce this in one of our clean installs.
Please use the following link to log in
hidden link

Please reproduce the issue by doing the following:
1. Configure WPML similarly to your website(languages), you should have a button in the dashboard.
2. Configure WooCommerce Multilingual, you should have a button in the dashboard.
3. Install Storefront theme and the Storefront hero plugin.
4. Configure a product in the hero section and translate it.

If the issue is reproduced, I'll escalate this ticket to our compatibility team to investigate this and fix it or contact the authors for help on that.

Thank you,
Jamal

August 30, 2019 at 1:08 pm #4487375

lixuanM

Hey,

I have tried this method, but it does not look like it works, and the theme is not working on this site either.

hidden link

August 30, 2019 at 1:52 pm #4487563

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

I activated the Storefront theme instead of the child theme and it is now working. Please try to reproduce the issue with the Storefront theme and let us escalate it to our compatibility team.

Best regards,
Jamal

August 30, 2019 at 5:41 pm #4488623

lixuanM

Hey,

I have done what you asked, what I think that I did something wrong. the first time I sett up default language, it was on English, and I did not realised that so I sett de default language as english. But after I changed it norwegian, same as what i said up on my WP.

I have sett up a product for product hero, but after I changed the default language from english to Norwegian, the product hero option is gone.