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

Last updated by Bruno Kos 2 months, 1 week ago.

Assigned support staff: Bruno Kos.

Author Posts
August 11, 2019 at 10:25 am #4376859

Martynas.V

Hello,

I am translating a website built with Revolution theme. I managed to made custom XML configuration but not sure if everything is correct in here.

<wpml-config>
<shortcodes>
<shortcode>
<tag>thb_slidetype</tag>
<attributes>
<attribute encoding="allow_html_tags">slide_text</attribute>
</attributes>
</shortcode>
<shortcode>
<tag>thb_iconbox</tag>
<attributes>
<attribute encoding="allow_html_tags">heading</attribute>
<attribute encoding="allow_html_tags">description</attribute>
</attributes>
</shortcode>
<shortcode>
<tag>thb_button_text</tag>
<attributes>
<attribute >title</attribute>
<attribute type="link" encoding="av_link">link</attribute>
</attributes>
</shortcode>
</shortcodes>
</wpml-config>

So I need help with the following things:
1) Translating button element. It has title and URL but it is not separated and decoded. I can see % in the link.
2) How can I translate "Row ID"? It is used as a anchor points.
3) How can I copy page custom css so both languages have custom css?

August 12, 2019 at 11:35 am #4380387

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support!

In order to debug this issue further quickly, would you be willing to provide me with temporary WordPress admin username so I could investigate the issue directly?

Can you also provide me with URLs where I can see the following cases:

1) Translating button element. It has title and URL but it is not separated and decoded. I can see % in the link.
2) How can I translate "Row ID"? It is used as a anchor points.
3) How can I copy page custom css so both languages have custom css?

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

August 13, 2019 at 6:19 am #4385219

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Can you disable Wordfence while we are working on this issue? I tried to login, but I received a "your temporarily locked out" message. Or perhaps if you only try to disable that module which controls the logins.

Regards,
Bruno Kos

August 13, 2019 at 6:30 am #4385233

Martynas.V

The user wasn't saved for some reason. Please try again with the same logins.

August 13, 2019 at 7:30 am #4385591

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

I am getting this now:

"VERIFICATION REQUIRED: Additional verification is required for login. Please check the email address associated with the account for a verification link."

Regards,
Bruno Kos

August 13, 2019 at 7:33 am #4385641

Martynas.V

Sorry for this. I did this and disabled wordfence.

August 13, 2019 at 8:20 am #4385757

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

That worked and I think I got this working.

1) Translating button element. It has title and URL but it is not separated and decoded. I can see % in the link.

Encoding attribute accepts the following values: json, base64, urlencode, so I modified your XML to fix it. It is this now:

   <shortcode>
            <tag>thb_button_text</tag>
            <attributes>
                <attribute type="link" encoding="urlencode">link</attribute>
            </attributes>
        </shortcode>

Since the original URL has this encoding, we should do it in translation as well because the button expects it, so it is like:

url:https%3A%2F%2Fwww.groacapital.com%2Fen%2Finvestments%2F|title:MORE||

https://wpml.org/documentation/support/language-configuration-files/#custom-fields

2) How can I translate "Row ID"? It is used as a anchor points.

I don't think you should do it - this is why:
https://wpml.org/forums/topic/translate-anchors-section-id/#post-2820593

I also think that some visual builders (also the one you're using on your site) dynamically generate CSS based on IDs etc. Even if this is not the case, if you create some CSS for original page, you cannot create new CSS for page one (unless you are translating that CSS, by setting the custom fields to translate them and not copy).

I'm not entirely sure on how did you set these anchors in menu items, because I do not see them in the menus here. However, perhaps ( based on the above) you should set these anchors in the translated menu as well, because these IDs for those sections do exist on translation.


3) How can I copy page custom css so both languages have custom css

I did exactly this and it worked:
https://wpml.org/forums/topic/wpbakery-page-builder-css-and-menu-issues/#post-1917025
hidden link

Regards,
Bruno Kos

August 13, 2019 at 9:04 am #4386359

Martynas.V

My issue is resolved now. Thank you!

Just to be clear about translating the button - I need to to encode url and the paste it in to the translations?

As for anchor menu items I need to disable some plugins in order to show anchor name input. But probably we will stay with not translating it.

August 13, 2019 at 9:18 am #4386551

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Just to be clear about translating the button - I need to to encode url and the paste it in to the translations?

That is correct - do it in the same way I did it, so follow the same format.

Regards,
Bruno Kos

August 13, 2019 at 9:26 am #4386585

Martynas.V

Can you post a link or "how-to" make that url encoding for the future?

August 13, 2019 at 10:50 am #4387175

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

There is no particular tutorial, only this:

https://wpml.org/forums/topic/translating-revolution-theme/#post-4385757

So in the URL, use "%2" where "/" should be :). I have nothing else to add here.

Regards,
Bruno Kos