Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Kor 10 months, 3 weeks ago.

Assisted by: Kor.

Author Posts
August 26, 2024 at 5:49 pm #16106326

martynasA

Background of the issue:
I have a shortcode attribute that I want to translate, for example:

[forminator_form id=1]

In my alternative language, I want this to be:

[forminator_form id=2]

Symptoms:
The shortcode does not show up as translatable despite me following your documentation.

Questions:
I followed this guide:
https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/

I included the XML configuration and added a wpml_tm_job_field_is_translatable filter to my functions.php.

The question is: how can I make the shortcode translatable?

August 26, 2024 at 6:06 pm #16106343

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

I've converted the chat into a ticket so that we could follow up.

August 26, 2024 at 6:13 pm #16106354

martynasA

It eventually showed up and I was able to set the shortcode ID.

However, the translated version is still loading the old ID.

What could be causing that?

August 27, 2024 at 9:30 am #16108652

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.

The topic ‘[Closed] Cannot translate a shortcode attribute’ is closed to new replies.