Skip Navigation

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

Last updated by Subash Chandra Poudel 1 year, 11 months ago.

Assisted by: Subash Chandra Poudel.

Author Posts
May 4, 2022 at 12:11 pm #11150981

antoineL-11

I have a custom post type that I can display in my secondary language and utilizing the Automatic Redirect Based on Browser Language browser.

I don't want to translate it but I also want visitor to see the custom posts in the good language. An example hidden link , hidden link

May 4, 2022 at 3:13 pm #11152643

Subash Chandra Poudel

Hi there,

After further testing, I can confirm that if you have "Always redirect visitors based on their browser language (redirect to homepage if translations are missing)" option enabled at:
WPML -> Languages page in "Browser language redirect" section

Then the posts should redirect to the browser language with WPML Browser language redirect, even though the post is not translated and "Translatable - use translation if available or fallback to default language" is selected for the post type at WPML -> Settings page in "Post Types Translation" section.

Can you please check your settings and confirm the correct options are selected?

Please review the following document for more details on Automatic redirects based on the browser language.

https://wpml.org/documentation/getting-started-guide/language-setup/automatic-redirect-based-on-browser-language/

If the redirection is still not working as expected, can you please deactivate all plugins on the site except WPML, ACF, and any other critical plugins, activate a default theme like twenty-twenty-one, and see if it works? if yes, activate other plugins and original theme one at a time to see which one stats the issue.

Please let me know how it goes for you so that we can troubleshoot the issue further.

Regards,
Subash

May 4, 2022 at 3:27 pm #11152791

antoineL-11

Hi Subash,
Thank you I confirm this is working. I have an additional question though :
My default language is French and my secondary language is english :
If a german visitor comes to my website : What language will he be redirected to ? French or english ?

May 4, 2022 at 3:55 pm #11153169

Subash Chandra Poudel

Hi there,

Thank you for confirming that it is working for you now.

If the user browser's language is not one of the languages supported by your WPML configuration then there will be no redirection on the page. The user will see the page in the language initially opened by the user.

Regards,
Subash

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.