Passer au contenu Passer à la barre latérale

Ce sujet est résolu. Voici une description du problème et de la solution.

Problem:
The client is experiencing issues with their multilingual WordPress site using Elementor and WPML. When switching from French to English, the main navigation menu does not update, certain images in the menu do not display correctly, and single post content does not translate. Additionally, specific links cannot be translated.

Solution:
1. We recommend increasing the WP_Memory_limit to 256M to ensure the site has enough resources. Instructions on how to do this can be found in our documentation: Increasing your site's memory limit.

2. To translate links, use the Translation Editor as outlined in our documentation: How to translate URLs, shortcodes, and HTML attributes using the Advanced Translation Editor.

3. For the links translation issue, we provided a workaround:
- Add custom XML configuration in WPML > Settings > Custom XML Configuration using the provided XML code.
- Add the provided PHP code to the theme's functions.php file.
- Make a small edit to the Menu on the front-end to allow the URLs to be found in the Translation Editor.

If this solution does not apply to your case, or if it is outdated, we highly recommend checking related known issues at WPML known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket: WPML support forum.

0% of people find this useful.

Il s'agit du forum d'assistance technique de WPML, le plug-in multilingue pour WordPress.

Il est accessible à tous, toutefois seuls les clients de WPML peuvent y publier leurs messages. L'équipe du WPML répond sur le forum 6 jours par semaine, 22 heures par jour.

Ce sujet contient 16 réponses, a 2 voix.

Dernière mise à jour par Ilyes Il y a 1 année et 5 mois.

Assisté par: Ilyes.

Auteur Messages
février 14, 2024 à 7:30 pm #15304242

Ilyes
Supporter

Les langues: Anglais (English ) Français (Français ) Arabe (العربية )

Fuseau horaire: Pacific/Easter (GMT-06:00)

Hello,

Thank you for installing it,

I was able to replicate the issue on our servers and I have already escalated this to our compatibility team.

I will let you know once I receive updates,

Best,

février 19, 2024 à 5:58 pm #15319841

Ilyes
Supporter

Les langues: Anglais (English ) Français (Français ) Arabe (العربية )

Fuseau horaire: Pacific/Easter (GMT-06:00)

Hello,

We have found a workaround for your Links translation issue,

1- We need to change the structure of the XML in order to get the URL, Please go to WPML > Settings > Custom XML Configuration and past this XML code :

<wpml-config>
  <elementor-widgets>
    <widget name="ucaddon_mega_menu">
      <fields-in-item items_of="uc_items">
        <field>title</field>
        <field key_of="link">url</field>
        <field key_of="link2">url</field>
      </fields-in-item>
    </widget>
  </elementor-widgets>
</wpml-config>

2. We then added the following code in the theme's functions.php, you should find these files under wp-content > Your theme folder > functions.php :

add_filter( 'wpml_pb_elementor_register_string_name_ucaddon_mega_menu', function( $name, $args ) {
	$widgetType = $args['element']['widgetType'];
	return $widgetType . '-' . $args['key'] . '-' . $args['field'] . '-' . $args['nodeId'] . '-' . $args['item']['_id'];
}, 10, 2 );

3- Lastly, visit the front-end for the new code to be taken into consideration, do a small edit to your Menu, and then you should be able to find the URLs in the translation Editor.

Please let me know if you need help implementing it.

Best,