Skip to content Skip to sidebar

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

Problem:
You are trying to translate an archive page for a custom type on your website using WPML, but parts of the page, specifically the list of custom posts, remain in English even though translations for each post have been created.
Solution:
1. Ensure that each translated view has its own unique ID as a shortcode attribute. You might need to replace these shortcodes manually using the WordPress Editor. However, be aware that these changes could be overwritten when you translate the content again with the WPML Translation Editor.
2. A recommended workaround is to use the following custom XML configuration in WPML > Settings > Custom XML Configuration (tab)
This configuration allows you to translate the name attribute of the shortcode in the WPML Translation Editor, which should resolve the issue.
3. Additionally, go to Divi > Theme Builder, open the "Resources Layout" body template, make a small edit and save. Then, navigate to WPML > Translation Management > Dashboard, set the post type filter to "Body Template", and find "Resources Layout" requesting a translation update. Create a translation job for yourself and access it at WPML > Translations. In the Advanced Translation Editor, search for the name of your MetaBoxView and translate it accordingly. Verify the name each shortcode uses in each language by checking MetaBox > Views.

If these steps do not resolve your issue, or if the solution seems 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. Additionally, please feel free to open a new support ticket for further assistance at WPML support forum.

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

Last updated by Andreas W. 10 months, 4 weeks ago.

Assisted by: Andreas W..

Author Posts
September 22, 2024 at 5:06 pm #16206485

agridenceI

Background of the issue:
I am trying to translate all pages on my site hidden link to Thai, French, Spanish, and Indonesian using WPML. I am following the standard documentation.

The specific page is hidden link - parts of the page are translated but the list of custom posts remain in English even when translations of each were already created.

Symptoms:
The archive page for a custom type is not translating. The specific page is hidden link.

Questions:
Why is the archive page for the custom type not translating?
How can I ensure that the archive page for the custom type translates correctly?

September 23, 2024 at 7:14 pm #16211575

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.

You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.

IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.

I may have to install a plugin called "All In One WP Migration" to make a copy of the website where I can investigate the issue further.

However, I would also be very grateful if you could provide a staging site or copy of the website from your server yourself for this purpose. This step would only be required if the issue is replicable on such a staging site.

If you have any questions about creating such a staging site, you can consult your hosting provider. Just take note that WPML should be registered on this site again.

If you are unable to provide such a copy of the site for testing, please let me know on this ticket.

The private response form looks like this:
hidden link

Next time you reply, click "I still need assistance."

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.

Best regards
Andreas

September 30, 2024 at 7:35 pm #16237504

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Your Resource Archive Page Template seems to use this shortcode for the section:

[mbv name="filter-sorting"]

This archive page is not showing any resources, even if I disable WPML:
hidden link

Could you please make sure that the original content works as expected, even without WPML being involved. I will be glad to assist you with the translations.

October 3, 2024 at 10:51 pm #16252119

agridenceI

Hi,

Thanks for getting back. Please see attached screenshot.

We are loading the shortcode from metabox views.

views render the resources which are boxed in blue in the screenshot.

So we translate the metabox views?

Screenshot 2024-10-03 at 23.48.31.png
October 3, 2024 at 11:20 pm #16252139

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

In this case, each translated view has its own unique ID as a shortcode attribute.

You would need to replace these shortcodes manually on each page, using the WordPress Editor but those changes might get overwritten once you translate the content again with the WPML Translation Editor.

A workaround would be to use the following config at WPML > Settings > Custom XML Configuration (tab):

<wpml-config>
  <shortcodes>
    <shortcode>
      <tag>mbv</tag>
        <attributes>
          <attribute>name</attribute>
        </attributes>
    </shortcode>
  </shortcodes>
</wpml-config>

Now, you should be able to translate the name attribute of the shortcode on the WPML Translation Editor and this usually should solve the issue. Important is that the attribute is translated correctly.

See screenshot. with examples of French shortcodes.

Please give this a test and let me know in case this does not solve the issue.

french shortcodes.jpg
October 4, 2024 at 11:08 am #16253733

agridenceI

Thank you, Adreas.

Nearly there it seems.

I have added the custom config and its rendering the correct view translation - as I can see in the tab names and the English translations are no longer pulled when choosing other languages.

I also added String Translations for [mbv name="filter-sorting"] using their respective translations as you indicated in the screenshot you provided.

However, its not pulling anything for the translations. Only the English version is showing data.

Would appreciate further help on the matter.

Thank you.

Screenshot 2024-10-04 at 11.56.57.png
Screenshot 2024-10-04 at 11.54.51.png
October 4, 2024 at 2:26 pm #16254724

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

The translation in this case would need to be taken on the WPML Translation Editor instead of using WPML > String Translation.

I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.

You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.

IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.

The private response form looks like this:
hidden link

Next time you reply, click "I still need assistance."

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.

October 10, 2024 at 9:47 pm #16277054

agridenceI

Hello Andreas,

For this comment - The translation in this case would need to be taken on the WPML Translation Editor instead of using WPML > String Translation.

Are you able to show us an example of how to do this?

Thank you.

October 11, 2024 at 1:29 am #16277290

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Go to Divi > Theme Builder, open the "Resources Layout" body template, make a small edit and save.

Nwo go to WPML > Translation Management > Dashboard and set the post type filter "All types" to "Body Template".

You should see "Resources Layout" which is requesting a translation update.

Create a translation job for yourself and access the job at WPML > Translations.

On the Advanced Translation Editor search for the name of your MetaBoxView.

Translate it accordingly. To do this, verify on MetaBox > Views which name each shortcode in each language us using.

If this will not solve the issue, please let me know.

How to use WPML Translation Management:
https://wpml.org/documentation/translating-your-contents/

Best regards
Andreas

October 13, 2024 at 4:42 pm #16283333

agridenceI

This solved the current issue.