This thread is resolved. Here is a description of the problem and solution.
Problem: If you're using The Events Calendar plugin and have translated the events slug in WPML, but the language switcher doesn't show the other languages unless you access the page directly via link (e.g., /it/events), where the switcher then displays normally. Solution: First, ensure that you have translated the Events into the respective languages. If the Events are not translated, they will not appear in the language switcher. For example, if the Event archive displayed only French in the language switcher, it indicates that Events are only available in French. Once you translate an Event into another language, such as English, the language switcher will start to include that language as an option.
If you want to show the default Events (in French) for other languages when translations are not available, you can adjust the WPML settings. Go to WPML > Settings > Post Type Translation and set the translation preference for the "Events" post type to "Translatable - use translation if available or fallback to default language". This setting will allow the default language events to be displayed in the language switcher even if they are not translated into other languages.
Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If the issue persists, we highly recommend checking the related 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.
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.
I'm using this plugin for events https://wordpress.org/plugins/the-events-calendar/ .
I translate the events slug in WPML, the switcher doesn't mention the other languages, but when I go to the page by link (Ex: /it/events), the switcher display normaly.
I understand the problem you're having. If the events were set up using the "Series events" feature recently added to the "The Events Calendar" plugin, it's possible you might face some challenges with the language switcher. This feature has not yet achieved full compatibility with WPML, which can lead to the absence of the language switcher on both the archive and individual pages for recurring events. Please check the Errata below for more details.
But, if the Events are configured in the traditional way, please try the following and check if that helps to solve the issue.
- Please go to "WPML > Settings" and scroll down to the "Post Type Translation" section.
- Locate the "Event" post type and translate its slug. Check this guide to understand the process: https://wpml.org/documentation/getting-started-guide/translating-page-slugs/#translating-a-post-types-url
- Once the Slug is Translated, please go to "WPML > Support > troubleshooting"
- Select "Events" from the Dropdown under "Clean up" and click on "Synchronize Post taxonomies"
- Once it is completed, please click on the following buttons from the troubleshooting page:
-- Disable cache for language switcher templates
-- Clear the cache in WPML
-- Set language information
-- Fix post-type assignment for translations
-- Update domain name in language switcher settings
Please let me know if the suggestion above helps or if you need further assistance in this matter. I will be happy to help.
Hello Amine,
Thank you for trying out the suggestion.
Since the issue persists, I would be happy to take a closer look to understand the root cause of the issue. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.
When you log in, you will find the needed fields below the comment area to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.
IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link
Hello There,
Thank you for sharing the access information.
Upon checking, I found that the Events you've created have not yet been translated into other languages. This is the reason why the Event archive displayed French in the language switcher, as it only had Events available in French. After translating one of the Events (Evenment 3) into English, the language switcher on the French version began to include English as an option. For a clearer picture, please refer to this screenshot (hidden link).
To have other languages appear in the language switcher, please translate the Events into the respective languages. If your preference is to show the default Events (in French) for other languages when translations are not available, you can adjust the settings by navigating to "WPML > Settings > Post Type Translation". Here, set the translation preference for the "Events" post type to "Translatable - use translation if available or fallback to default language". This setting will ensure that the default events will be available in other languages if the events are not translated. In this way, the other languages will also displayed in the language switcher.
I hope you can understand. If there is anything else you need help with, feel free to let me know. I will be happy to help.