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 11 replies, has 2 voices.

Last updated by Yvette 1 month, 1 week ago.

Assigned support staff: Yvette.

Author Posts
September 5, 2019 at 7:05 am

kenilP

I am trying to:Translate my page to Arabic using language switcher

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

I expected to see: Whole page translated to Arabic, but my custom divi module(cpmv6_product) doesnt translate. I have also added config

Instead, I got: Custom module in English only

September 5, 2019 at 10:50 am #4518537

Yvette
Supporter

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

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

Hello

I am unable to reach your site, the connection always times out. I cannot view either the frontend or the backend.

You wrote: "...I expected to see: Whole page translated to Arabic, but my custom divi module(cpmv6_product) doesnt translate. .."

Clarifications:
1. Is the product fully translated?
2. If you create a test page with only this custom divi module in it, does the translation still not show?
3. Do you have Woocommerce Multilingual installed and fully configured if you are using Woocommerce?
4. If you temporarily deactivate all non-WPML plugins except for Woocommerce...are you still unable to see the transalted product on that test page?

Please check that I have all the information to correctly connect to your site. If I can still not connect, I will create a sandbox site preinstalled with WPML , WCML, DIVI and Woocommerce. Then I will ask you to create a sample page that illustrates the problem you are having.

Thanks.

September 5, 2019 at 12:32 pm #4519293

kenilP

Clarifications:
1. Is the product fully translated?
I have used automatic translation to convert just homepage to Arabic, entire page except my custom divi module is translated.

2. If you create a test page with only this custom divi module in it, does the translation still not show?
Yes, i tried it, the translation still doesnt show

3. Do you have Woocommerce Multilingual installed and fully configured if you are using Woocommerce?
I am not using woocommerce

4. If you temporarily deactivate all non-WPML plugins except for Woocommerce...are you still unable to see the transalted product on that test page?

Am not using woocomerce

Actully, this is a internal server, and the access is blocked outside. I dont think i will be able to give access to you. I can create a page illustrating the issue..

I have also added this config in wpml-config.php...but still it doesnt help
<wpml-config>
<shortcodes>
<shortcode>
<tag>cpmv6_product</tag>
<attributes>
<attribute>select</attribute>
<attribute>button_link</attribute>
</attributes>
</shortcode>
<shortcode>
<tag>et_pb_section</tag>
</shortcode>
<shortcode>
<tag>et_pb_row</tag>
</shortcode>
<shortcode>
<tag>et_pb_column</tag>
</shortcode>
</shortcodes>
</wpml-config>

September 5, 2019 at 12:38 pm #4519313

kenilP

I have created a custom divi module called "cpmv6_product" using divi-extention approach. It has just 2 fields select and button_link. Based on my R&D, we need to configue the custom module in the config file. But thats not working. Except the custom module the entire page which consists all inbuilt divi modules, are being translated.

September 5, 2019 at 4:06 pm #4520683

Yvette
Supporter

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

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

Hello

Since I cannot connect to your machine, please use this sandbox site which is preloaded and configured with WPML and DIVI:
hidden link

If you can recreate the issue there, then we will be able to investigate the problem.

September 5, 2019 at 5:54 pm #4521245

kenilP

Hello,
I am trying to re-create the issue.
The custom divi module i have created is using divi extention, and it added as a plugin.
In the sandbox you have provided, am not able to add a plugin, is it possible to have backend FTP access

September 6, 2019 at 7:07 am #4523551

Yvette
Supporter

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

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

The one-click login gives you administrator access to the site.

You can find more information from the dashboard here:
WP Sandbox > Advanced.

In any case, here is the FTP information from that same screen/panel:
SFTP Credentials
Server: w6.wpsandbox.pro
Username: alert-barracuda
Password: TLw6eo9p3gSK3yNX089UW3vk
Port: 2222

September 6, 2019 at 10:14 am #4524719

kenilP

Hi,
I have recreated the issue in the sandbox.
I have added my custom divi module as a plugin.
But the text in the plugin, is not recognizing for translation.
This is the same issue am facing in my system. I am using automatic translation using advanced translation editor. Am not able to setup automatic machine translation in the sandbox. But still the texts in the module is not getting recognized for translation.
I have created a demo page and added my custom module. The labguage switch is available at the bottom of the page.

hidden link

September 6, 2019 at 2:57 pm #4526135

Yvette
Supporter

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

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

Thank you - I am going to look at this now and see if I can find some resources for you

September 6, 2019 at 4:03 pm #4526445

Yvette
Supporter

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

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

Hello

I added the following additional XML configuration to the WPML > Settings > Custom XML Configuration tab:

<wpml-config>
    <shortcodes>
        <shortcode>
            <tag>cpmv6_product</tag>
           <attributes>
                <attribute>select</attribute>
                 <attribute>sku</attribute>
            </attributes>
        </shortcode>
    </shortcodes>
</wpml-config>

The result was to be able to translate the "content" texts as defined by your module. Is this what you needed?

Please note that if the shortcode is generating additional texts that are not visible in the post-content of the page, then this would not be accessible for translation by WPML via the Translation Editor. Only the texts that are within the configuration of the shortcode are visible to WPML.

Please advise.

September 7, 2019 at 5:31 pm #4529705

kenilP

Hi,
Actually, i dont want my setting to be translated, but, i want the text inside the module to be translated. As you see in my custom module, based on the setting, am showing the layout, later, i will populate data dynamically

September 9, 2019 at 6:42 am #4533819

Yvette
Supporter

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

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

Hello

You wrote: ".. i want the text inside the module to be translated"

Do you mean the plan text that seems to be generated by your plugin? (see image). The text within php files needs to be wrapped in gettext notation as described here in WordPress codex:
https://codex.wordpress.org/I18n_for_WordPress_Developers

Once you have wrapped all the texts in gettext notation, you should rescan your plugin using
WPML > Theme and plugin localization

This will register the strings for translation with the String Translation table. The gettext notation should trigger our translation filters at the time of rendering the page.

I hope this answers your question now.

The topic ‘[Closed] Custom divi module is not translating’ is closed to new replies.