This thread is resolved. Here is a description of the problem and solution.
Problem: The client was having difficulty with the WPML language switcher not displaying all languages and redirecting to the homepage instead of the translated page when switching languages.
Solution: Step 1: We advised the client to check if the translation for the specific page was available. If not, the language switcher might skip the missing translation. Step 2: To change this behavior, we instructed the client to navigate to WPML -> Languages -> Language switcher options and set 'How to handle languages without translation' to 'Link to home of language for missing translations'.
Step 3: If the client wants the language switcher to redirect to the main language when a translation is not available for a specific post type, they should: - Go to WPML -> Settings -> Post Types Translation - Set the post type (e.g., Pages, Posts, Products) to 'Translatable - use translation if available or fallback to default language'.
This configuration will redirect users to the main language version of the post type if a translation is not available, and will serve the translated version normally once it is available.
If the solution provided here is not relevant due to being outdated or not applicable to your case, we recommend opening a new support ticket. We also highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please contact us in the 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.
We just purchased WPML and we are having difficulty in setting up the language switcher. I currently have it enabled on the footer but it is displaying only the default language. The other 2 languages (Chinese - Simplified & Traditional) is not displaying.
Is there any documentation that you are following?
I have followed your documentations of how to display the language switcher on the header and footer and other videos to no avail.
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hello there,
Thank you for contacting our support.
It is possible that this is happening due to you not having a translation available for that specific page yet.
In that case the default behavior is to skip the missing translation language in the language switcher.
You can, however, change this behavior by going to WPML -> Language -> Language switcher options > How to handle languages without translation and set it to 'Link to home of language for missing translations'.
Please give it a try and let us know if it gets the issue fixed.
Meanwhile, I had earlier translated this page to Chinese (Traditional) hidden link. I am expecting to see that when I switch using the language switcher link, it should send me to hidden link but it rather redirects me to the homepage.
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hello there,
This is the expected behavior, because you configured the language switcher to link to the home page when a translation is not available.
What you could do in this case, is to let WPML know that for that specific Post Type, when a translation is not found, it can redirect the user to the main language.
To do that you can follow the steps:
- Go to WPML -> Settings -> Post Types Translation
- Then you can set that post type(eg.: Pages, Post, Products, etc) to Translatable
use translation if available or fallback to default language.
This will cause that Post type to be redirect to the main language in case you still doesn't have a translation for that post in that language.
As soon as you have translated that post, the translated version will be served normally.
Thank you, please give it a try and let us know if it is working as expected for you.
Many thanks for the solution. It is making more sense. However, I am still stuck. For instance, I translated this page - hidden link to Chinese (Traditional). I expect that when I click the switcher, it will display Chinese here - hidden link. It doesn't rather it shows same default language (English) and then removes the header and footer.
Kindly help look into this too. You can also share specific tutorials from your knowledge base to help me.
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hello Franklin,
Can you please check if when you try to edit the translation, the progress bar marks the page as being 100% translated? If it is anything less that 100%, it will consider it as not being translated and fall back to the original language.
Also, please check if the translated page is published and not set to draft, you can do it in the Page editing screen, switching to Chinese in the admin top bar and checking the status of that page on the secondary language.
If the page is published and 100% translated, I would like to request temporary access (wp-admin and FTP) to your site to take better look at this issue. You will find the needed fields for this below the comment area when you log in 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.
Our Debugging Procedures
I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.
- Please make a backup of 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
Please, let me know if you need any additional details. Have a nice day.
Thanks for the guide. I saw the translation is 99% completed that was the reason. I have now successfully completed it and its linking fine now.
I have yet another concern. In some cases the content of the default language page is not the same as the translated page. I will like to uniquely make changes to the translated language page without affecting the content default language page.
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hello there,
I'm glad to know that you were able to fix that issue.
Regarding your question, translating your content with WPML works in a certain flow. Whenever you create or edit a translation, it'll get the current state of the main page and apply the translation on top of it.
It means that if you update the page in the main language, it is necessary for you to edit the translation and reach 100% of the progress bar for the changes to be shared with the translation as well.
There's an option for you to translate the page manually, it will create a copy of the current state of that page in the main language, and allow you to use the WordPress editor for you to translate it.
Please take a look onto that and see if this is what you need, otherwise, please give me more details about the issue so I can double-check it.
Sometimes screenshots illustrating what you mean may go a long way to clarify what words fail to transmit, so if you like, make use of “upload an image” below the comment area.
Thanks always for the guide. I am making good progress.
I now have an issue with the category slugs. The category slug is translating automatically to Chinese. I read in the forum - https://wpml.org/forums/topic/keep-slugs-in-english/ that I can set "Encode URLs" to YES for all languages (except the original) and then under PAGE URL, I should set it to "Copy from original language if translation language uses encoded URLs". I had earlier set this to "Translate (this will include the slug in the translation and not create it automatically from the title)" when I was trying to fix only the page URL.
I did follow the guide in that forum and this is now what I get:
1. All page/post/category slugs are now in Chinese.
What I want: All the page/post/category slug should be same as the default language.
I will appreciate a thorough guide on this.
Thanks
New threads created by Mateus Getulio and linked to this one are listed below:
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hello there,
Thank you for confirming the initial issue is fixed.
Due to our policy of having one issue per ticket, I'll split your last reply into its own separated ticket and address it here directly.
I'll provide you with a reply in the new ticket soon.
Thank you,
Mateus
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.