Skip Navigation

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 19 replies, has 3 voices.

Last updated by Kor 7 months, 3 weeks ago.

Assisted by: Kor.

Author Posts
April 28, 2023 at 8:48 am #13555849

Nohemi

Hi

I'm using tablepress. I read this : https://wpml.org/errata/tablepress-tables-cant-be-translated/

You said, the easiest translation is to create one table per language and use the relevant shortcode on the translated pages. Ok but how you "use the relevant shortcode on translated pages" with advanced editor ?

I read : https://wpml.org/fr/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/

The shortcode looks like [table id=1 /].

I can translate the "table" string but not the "1" (Because it's a number and not a string ?) it doesn't appear in advanced editor.

How i can modify this "1" on my translated page ?

April 28, 2023 at 1:55 pm #13557969

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+03:00)

Hi there,

Thank you for contacting WPML support!

Before assigning your ticket to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

The shortcode looks like [table id=1 /].

To be able to search for that shortcode in the translation editor, you'll need to register it first.

So you can add the following to WPML → Settings → Custom XML Configuration:

<wpml-config>
  <shortcodes>
    <shortcode>
        <tag>table</tag>
        <attributes>
            <attribute>id</attribute>
        </attributes>
    </shortcode>
  </shortcodes>
</wpml-config>

After that, update the original page with any text (you can update the title) and then when you go to the translation editor, you'll be able to search for and find the ID to translate it.

Hope that helps 🙂

April 28, 2023 at 2:36 pm #13558167

Nohemi

Thank you for your answer.
It still doesn't work with an integer, but I noticed that if I enter a string (like "test string") in my id, the attribute become translatable.
It really looks like WPML doesn't want to translate an integer.

April 28, 2023 at 2:50 pm #13558215

Nohemi

Even if the attribute is translatable, it is always the original language value which is used in front :/

So 2 issues :

- I can't translate an integer attribute
- The translation is not used in front

Edit : Actually I tested a value like "1|" because tablepress remove all special characters so it could work and indeed it is translatable but it is the original value on front. No problem with a "normal" string without number.
Seems WPML doesnt like there is a number in the string...

May 2, 2023 at 4:56 am #13566793

Kor
Supporter

Languages: English (English )

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

Hi there,

Thanks for your reply.

Could you please try applying the custom PHP code as explained here https://wpml.org/forums/topic/some-translated-elementorpages-and-the-footer-lost-synchronisation/#post-13499405 and see if it works?

Let me know how it goes.

Thanks!

Kor

May 2, 2023 at 7:25 am #13567395

Nohemi

Hi,

Thank you for your answer.

With this code, the integer is now translatable. But the translation value is not displayed in front. It is always the original language value. :/

May 2, 2023 at 9:30 am #13568981

Kor
Supporter

Languages: English (English )

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

Hi there,

Thanks for your reply.

I would need to take a closer look at your site. So I would need to request temporary access (WP-Admin and FTP) preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed

IMPORTANT: Please, note, a backup is required for security reasons, and to avoid any data loss, you can use the https://wordpress.org/plugins/updraftplus/plugin for these backup needs.

Your following answer will be private, which means only you and I have access to it.

✙ I would need your permission to de-activate and re-activate Plugins and the Theme and to change configurations on the site if required. This is also a reason the backup is critical.

While checking your debug information, I noticed that your “WP Memory Limit” PHP limit is below the required 128MB or recommended 256MB as described at: https://wpml.org/home/minimum-requirements/ . Could you please contact your hosting provider and ask them to increase this PHP value for you?

Thanks!

Kor

May 2, 2023 at 7:55 pm #13573923

Kor
Supporter

Languages: English (English )

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

Hi there,

Thanks for your reply.

May I know where did you insert the custom PHP code that I shared here? https://wpml.org/forums/topic/some-translated-elementorpages-and-the-footer-lost-synchronisation/#post-13499405

I need to check and see if you've inserted it correctly.

Thanks!

Kor

May 4, 2023 at 7:32 am #13583281

Nohemi

Hi,

It is here : wp-content/themes/twentytwentythree/functions.php

May 4, 2023 at 10:35 am #13585403

Kor
Supporter

Languages: English (English )

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

Hi there,

Thanks for your reply.

I've checked and it seems to work fine when I deactivated Elementor Plugins. hidden link

Could you please confirm that it works on your end too?

Thanks!

Kor

May 4, 2023 at 11:00 am #13585591

Nohemi

Hi,

Yes it works but I need Elementor

May 5, 2023 at 6:53 am #13590999

Kor
Supporter

Languages: English (English )

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

hi there,

Thanks for your reply.

I've reactivated the Elementor plugin and it still works fine hidden link .

Could you please retest again?

Thanks!

Kor

May 5, 2023 at 7:15 am #13591123

Nohemi

Okay but it is not an Elementor page, so yes it works but if I switch this page to Elementor : hidden link, it doesn't work anymore.

And now I can't translate the string attribute "myattr" while it worked before.

So to resume what I want to do :
- Translate an integer attribute of a shortcode inside the shortcode widget of Elementor on an Elementor page.

May 8, 2023 at 8:01 pm #13608763

Kor
Supporter

Languages: English (English )

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

Hi there,

Thanks for your reply.

I will have to test this on our sandbox site to see if I could replicate it.

I'll come back to you as quickly as possible.

Thanks!

Kor

May 10, 2023 at 8:44 am #13619747

Kor
Supporter

Languages: English (English )

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

Hi there,

Thanks for your reply.

I can replicate the issue here hidden link on this page hidden link when I try translate the number.

However, I'm able to translate the myattr string.

I'll check with our 2nd Tier Support regarding this to see if we have another way to accomplish this. I'll come back to you as quickly as possible.

Thanks!

Kor

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.