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 some strings created with WPBakery and some modules provided by the theme
Solution:
The modules needs to be configured, add the following code to WPML->Setting->Custom XML Configuration

<wpml-config>
    <shortcodes>
        <shortcode>
            <tag>dfd_heading</tag>
            <attributes>
                <attribute>content</attribute>
                <attribute>subtitle</attribute>
                <attribute>content_alignment</attribute>
            </attributes>
        </shortcode>
    </shortcodes>
</wpml-config>

Manual translation remain also a viable workaround.
Relevant Documentation:
https://wpml.org/documentation/support/language-configuration-files/
https://wpml.org/documentation/support/language-configuration-files/overriding-language-configuration-files/

This topic contains 10 replies, has 3 voices.

Last updated by shawkattR 3 months, 2 weeks ago.

Assigned support staff: Jamal.

Author Posts
July 3, 2019 at 8:05 am #4132905

shawkattR

Hi there,

Can you help to check why my Arabic site always revert the old content and setting every time I'd edited new content and setting?

July 3, 2019 at 9:14 am #4133825

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support!

Can you tell me if you you have created duplicates and not translations perhaps?
https://wpml.org/documentation/translating-your-contents/displaying-untranslated-content-on-pages-in-secondary-languages/using-content-duplication/#convert-between-translation-and-duplicate

If your translations are set as duplicates, then it is normal that it gets overwritten on each original update.

If this is not the case, it would be great if you could record a screencast using online applications such as hidden link and explain where and when the issue occurs.

Regards,
Bruno Kos

July 3, 2019 at 9:30 am #4133905

shawkattR

Thanks Bruno kos for your prompt reply.

Please see the attached.
Let me now if you need the access to my development site as well. Thanks!

July 3, 2019 at 9:43 am #4134125

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Let me now if you need the access to my development site as well.

I have marked your next reply private so you can safely add this information.

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

Please make a full backup of your site before sharing this info!

You can use plugins such as UpdraftPlus WordPress Backup Plugin (https://wordpress.org/plugins/updraftplus/) or ask your host to perform a site backup.

Regards,
Bruno Kos

July 3, 2019 at 9:59 am #4134379

shawkattR

Pls refer the admin credential in other support ticket, thanks!

July 3, 2019 at 2:11 pm #4137243

Jamal
Supporter

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

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

Hello,

My colleague Bruno assigned me this ticket as I can read Arabic. If you don't mind, I'll continue with you.

From what I could gather so far. There are two issues here related to Visual Composer modules added by the theme:
- dfd_animated_text: Regarding screenshot 01.
- dfd_heading: Regarding screenshots 02 and 03.

For the first one, the shortcode of the module is actually not configured to translate one of its attributes "text_fields":


[dfd_animated_text 
	alignment="text-center" 
	title_custom_fonts="font_family:Dosis%3A200%2C300%2Cregular%2C500%2C600%2C700%2C800|font_style:500%20bold%20regular%3A500%3Anormal" 
	pref_post_custom_fonts="font_family:Dosis%3A200%2C300%2Cregular%2C500%2C600%2C700%2C800|font_style:500%20bold%20regular%3A500%3Anormal" 
	title_google_fonts="yes" 
	pref_post_google_fonts="yes" 
	type_speed="30" 
	style="typed" 
	text_fields="%5B%7B%22text_field%22%3A%22SCIENCE.%20PERFORMANCE%20.%20CUSTOMIZABILLITY.%22%7D%2C%7B%22text_field%22%3A%22POWER%20.%20INNOVATIONS%20.%20IRREPROACHABILITY.%22%7D%5D" 
	title_font_options="font_size:45|line_height:65" pref_post_font_options="font_size:45|line_height:65" 
	prefix_postfix_responsive="font_size_tablet:40|font_size_mobile:32|line_height_mobile:44" 
	text_responsive="font_size_tablet:40|font_size_mobile:32|line_height_mobile:44" 
	mobile_min_height="88"
]

text_fields is not configured to be translatable in the theme wpml-config.xml.
text_fields holds an encoded array. So you will need configuration and custom code to fix it. See this article
https://wpml.org/documentation/support/translating-urlencoded-shortcodes/

For the one, the alignement to left is caused by this css class "text-left" that is also part of the shortcode attributes "content_alignment":

[dfd_heading 
	module_animation="transition.slideRightIn" 
	content_alignment="text-left" 
	delimiter_settings="border-bottom-style:solid;|border-bottom-width:15px;|width:15px;|border-bottom-color:#f8b864;" 
	delimiter_margin="margin-bottom:25px;" 
	title_google_fonts="yes" 
	title_custom_fonts="font_family:Dosis%3A200%2C300%2Cregular%2C500%2C600%2C700%2C800|font_style:500%20bold%20regular%3A500%3Anormal" style="style_04" title_font_options="tag:h4|font_size:45|color:%23353535|line_height:55" 
	subtitle_font_options="tag:h3" 
	title_responsive="font_size_desktop:33|line_height_desktop:38|font_size_tablet:30|line_height_tablet:40|font_size_mobile:26|line_height_mobile:32"
]

تنوع الرؤي والإستخدامات

 تصميم وعلم هندسة البرنامج

 النهج والمنهجية

[/dfd_heading]

So if you add the following code to WPML->Settings->Custom XML Configuration, it will make the attribute translatable, then you will be able to translate the class to "text-right".

<wpml-config>
    <shortcodes>
        <shortcode>
            <tag>dfd_heading</tag>
            <attributes>
                <attribute>content</attribute>
                <attribute>subtitle</attribute>
                <attribute>content_alignment</attribute>
            </attributes>
        </shortcode>
    </shortcodes>
</wpml-config>

I already added the code to custom configuration. You will need to update the dfd_heading content slightly in the original page and save in order to force the translation of the shortcode.

I hope this helps. Let me know if you have any doubts about it.

Best regards,
Jamal

July 3, 2019 at 2:21 pm #4137313

shawkattR

Hi Jamal,

Thanks for your reply!
For the "dfd_animated_text" I am actually did translate them to Arabic by visual composer backend editor. But after few days, it automatically revert to english instead of Arabic so mean I wasted my time to edit this. I hope you may help to check if I have any configure did wrongly in the WPML setting?

Regards,

Shawkatt

July 3, 2019 at 3:37 pm #4137969

Jamal
Supporter

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

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

Hi Shawkatt,

Ok, if you have edited manually the translation in the Visual composer editor. You will need to continue translating this page this way, manually. When you update the content. WPML will always ask to update translations too. So, you will need to translate to Arabic manually. I know, this can be time-consuming.

WPML cannot handle both translation modes(Editor, manually). Manual translation remains the workaround with visual editors that are not compatible, in this case, the dfd_* shortcodes.

Now, if you would like to make your shortcodes compatible with WPML. I suggest that you keep translating the homepage manually and test on another page with the translation editor until you make the shortcodes compatible. Then retranslate the homepage using the translation editor.

Best regards,
Jamal

July 4, 2019 at 3:28 am #4140081

shawkattR

Hi Jamal,

Thanks for your clarification.

May I know how can I turn off the "translation editor" at this moment to avoid my other developers accidentally use it? So we can manually edit every page.

Pls advice, thanks!

Regards,

Shawkatt

July 4, 2019 at 12:01 pm #4142953

Jamal
Supporter

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

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

Hi Shawkatt,

Sure, see the attached image on how to open the translation manually. You will need to deactivate WPML translation Editor.

But there will be also a way to open translation in the Translation Editor. So the best to do is to educate your users about this page's translation mode.

I'll remain at your disposal.

Best regards,
Jamal

July 8, 2019 at 2:58 am #4158671

shawkattR

My issue is resolved now. Thank you!