Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is unable to find specific templates in the WPML String Translation or Admin Texts Translation areas. These templates are created using a custom shortcode, [Ruby_E_Template id="3476"], and are not appearing due to their unique IDs which differ per language.

Solution:
To resolve this issue, we recommend the following steps:
1. Add the following code to your theme’s functions.php file:

add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' );

2. Insert the below XML in WPML >> Settings > Custom XML Configuration section:

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

3. Edit the default language page where the shortcode is used. Make a small change (like updating the title), then save.
4. Open the translation in WPML’s Translation Editor. You should now see the template ID string (e.g., 3476). Replace it with the translated template ID.
5. Complete the translation and check if it shows correctly on the front end.

For more details on making shortcodes translatable, please visit our documentation.

If the solution provided does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.

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.

Tagged: 

This topic contains 4 replies, has 0 voices.

Last updated by Noman 1 month ago.

Assisted by: Noman.

Author Posts
May 25, 2025 at 5:24 pm #17070369

josephN-9

<b>Background of the issue: </b>
I need to translate a few templates using string translation, but I cannot find them in the string translation area or even in Admin Texts Translation. The issue can be seen on this page: hidden link.

<b>Symptoms: </b>
I cannot find the templates I need to translate in the string translation area or Admin Texts Translation.

<b>Questions: </b>
Why can't I find the templates in the string translation area?
How can I translate templates that are not appearing in Admin Texts Translation?

I'm using Foxiz theme, Elementor page builder and all is up to date:

I created a few Ruby template for individual category [Ruby_E_Template id="3476"]
And translated it to spanish

when I try to translate it from "string translation"

I cannot find this template by search and not even Admin Texts Translation.

What's wrong ?

Screenshot(71).png
Screenshot(72).png
May 26, 2025 at 12:35 pm #17073304

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. The string translation is used to translate the strings which are coming from theme/plugins files or theme/plugins options pages.

In your case, it looks like you're using a custom shortcode like this:

[Ruby_E_Template id="3476"]

This shortcode is likely created by a custom post type, and each language may use a different ID.

To translate this properly, please follow these steps:

1. Add this code to your theme’s functions.php file:

add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' );

2. Add the below XML in WPML >> Settings > Custom XML Configuration section:

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

3. Edit the default language page where the shortcode is used. Make a small change (like updating the title), then save.

4. Open the translation in WPML’s Translation Editor. You should now see the template ID string (e.g., 3476). Replace it with the translated template ID.

5. Complete the translation and check if it shows correctly on the front end.

Here is a doc for more details:
https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/#making-shortcodes-translatable

If you still have issue, please send me a screenshot of where exactly the shortcode is used in Elementor.

Let me know how it goes!
Thank you

ID translation.jpg
May 26, 2025 at 1:17 pm #17073487

josephN-9

Hi,
I'm using Foxiz Child theme. I encountered an error when I put below code on funmction.php of child theme

dd_filter( 'wpml_tm_job_field_is_translatable', '__return_true' );

Error:
------------------
Your PHP code changes were not applied due to an error on line 4 of file wp-content/themes/foxiz-child/functions.php. Please fix and try saving again.

Uncaught Error: Call to undefined function dd_filter() in wp-content/themes/foxiz-child/functions.php:4

-------------

However, Please keep in mind:
I have built header and footer template from dashboard > Ruby Template
Footer = [Ruby_E_Template id="3272"]
header = [Ruby_E_Template id="2987"]

These shortcode are available on Dashboard > WPML > String translation

But another individual category template that I have created earlier they are not available on Dashboard > WPML > String translation

Screenshot(74).png
May 26, 2025 at 1:49 pm #17073641

josephN-9

Hlw sorry...

Now I have added code on function.php and WPML >> Settings > Custom XML Configuration section.

And Change this template[Ruby_E_Template id="3459"] style and publish again by elementor builder.

But still I cannot find [Ruby_E_Template id="3459"] this one from Dashboard > WPML > String translation

--------------------------------------
However, Please keep in mind:
I have built header and footer template from dashboard > Ruby Template
Footer = [Ruby_E_Template id="3272"]
header = [Ruby_E_Template id="2987"]

These shortcode are available on Dashboard > WPML > String translation

But another individual category template that I have created yesterday they are not available on Dashboard > WPML > String translation

May 27, 2025 at 8:34 am #17076399

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for the update. Since the shortcode [Ruby_E_Template id="3459"] is not showing in String Translation, it's likely because it's used inside an Elementor template or content that isn’t yet connected to WPML’s translation workflow.

Here’s what I recommend:

1. Edit the page where the shortcode is used.
2. Make a small change and update the page.
3. Then open the translation, the template ID should now appear for translation.

Let me know if the ID appears in the Translation Editor after that. Please try to search for a shortcode ID using the search input box.

If not, please send a screenshot and page link where exactly [Ruby_E_Template id="3459"] shortcode is being used.

Kindly let me know the results,

Thank you