Sauter la navigation

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

Problème :
Les liens hypertextes internes sur le site ne se traduisent pas automatiquement en utilisant WPML. Les liens dirigent vers la page dans la langue par défaut plutôt que dans la langue sélectionnée.
Solution :
1. Assurez-vous que toutes les pages ou articles liés sont correctement traduits et publiés, et non enregistrés en tant que 'Brouillon'. Pour cela :
- Changez la langue dans le tableau de bord WordPress.
- Allez dans la section Page/Article.
- Si un article est en 'Brouillon', cliquez sur 'Édition rapide' et changez le 'Statut' en 'Publié'.
2. Utilisez des URL relatifs pour les liens internes. Par exemple, utilisez '/contact' au lieu de 'https://example.com/contact'.
3. Mettez à jour le format de l'URL dans la page par défaut et assurez-vous de mettre à jour la traduction également.
4. Si le problème persiste, essayez les étapes suivantes dans 'WPML > Support > Dépannage' :
- Synchronisez les taxonomies des articles.
- Effacez le cache dans WPML.
- Attribuez le statut de traduction au contenu dupliqué.
- Définissez les informations linguistiques.
- Corrigez l'attribution de type de publication pour les traductions.
5. Ouvrez une page dans la langue par défaut où vous avez lié une page en interne, modifiez légèrement le titre de la page, sauvegardez les modifications et mettez à jour la traduction.

Si cette solution ne résout pas votre problème ou semble obsolète, nous vous recommandons de vérifier les problèmes connus, de vérifier la version de la correction permanente et de confirmer que vous avez installé les dernières versions des thèmes et plugins. Si le problème persiste, n'hésitez pas à ouvrir un nouveau ticket de support sur notre forum de support.

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.

Marqué : 

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

Dernière mise à jour par Prosenjit Barman Il y a 11 mois et 4 semaines.

Assisté par: Prosenjit Barman.

Auteur Articles
juin 9, 2024 à 2:43 pm #15719495

geraldineB-5

Contexte de la question:
Je travaille sur le site lien caché et j'utilise WPML pour la traduction. Je veux que les liens hypertextes internes sur le site se traduisent automatiquement.

Symptômes:
Les liens hypertextes présents sur le site ne se traduisent pas automatiquement. Sur le site en anglais, si l'on clique sur un lien vers une autre page du site, cela nous dirige vers la page mais dans la langue par défaut (Français).

Questions:
Comment faire pour que les liens hypertextes internes se traduisent automatiquement avec WPML?
Y a-t-il une configuration spécifique à vérifier pour les liens internes dans WPML?

juin 10, 2024 à 8:35 am #15720659

Prosenjit Barman
Partisan de WPML depuis 03/2023

Les langues: Anglais (English )

Fuseau horaire: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

To reduce the waiting time, I took this ticket and responded in English. Please let me know if you're okay with it or want to continue the conversation in French language. I will check and forward the ticket to one of our French supporters to assist you in the French language.

I understand your query. Please note that all internal links should automatically update in other languages, based on the availability of their translations. If you find that the links are not updating as expected, it's advisable to check the corresponding page or post to confirm that it has been accurately translated into the other languages. Also, make sure that the translated page or posts are not saved in 'Draft'. To check that, please follow the steps below.

- Switch to a secondary language from the WordPress dashboard.
- Navigate to the Page/post section.
- If a post/page is saved in Draft, that will be denoted as "Draft".
- To publish that, click on "Quick Edit" and set the "Status" of that post/page to "Published"

I'd also like to suggest that when linking to a post/page, use the relative URL format instead of the full URL. For example- While linking to the "contact" page, rather than using 'lien caché', simply use '/contact'. Using the relative URL format often resolves issues related to links pointing incorrectly in other languages.

You can check this article to know more about the URL formats: lien caché

After updating the URL format in the default page, make sure to update the translation as well.

Please check and let me know the update. I will be happy to help if you need further assistance in this matter.

Best Regards,
Prosenjit

juin 10, 2024 à 11:19 am #15721776

geraldineB-5

Hi Thanks for the answer. as you said WPML plugin should be able to translate the URL (absolute or relative). on our case none of the link on the page translate. i checked the pages and they are accurately translated and up to date, only the URL are not. is there a way to make it work ? it would take too much time to go on each link and change it to a relative one. i also used 'translate links target' but nothing changed. What can i do to have the plugin translate the URL to the corresponding language ?

Thanks for your time

juin 10, 2024 à 2:43 pm #15722781

geraldineB-5

I changed the links to relatives URL but the problem is still there

juin 11, 2024 à 4:56 am #15724420

Prosenjit Barman
Partisan de WPML depuis 03/2023

Les langues: Anglais (English )

Fuseau horaire: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for the update.

The "link target" feature usually helps in correcting incorrect links. Since internal links are still not displaying correctly, you can try the following steps:

1. Go to "WPML > Support > Troubleshooting."
2. Scroll down and click the following buttons:
- Synchronize posts taxonomies (Select posts/pages from the dropdown before clicking the button)
- Clear the cache in WPML
- Assign translation status to duplicated content
- Set language information
- Fix post-type assignment for translations
3. Once done, open any of the pages in the default language where you've internally linked a page.
4. Make a small change in the page title, save the changes, and update the translation.

I hope it will help. If you need further assistance, feel free to let me know. I will be happy to help.

Best regards,
Prosenjit