This thread is resolved. Here is a description of the problem and solution.
Problem: The client's website is in French/Chinese, and Chinese mobile users leave the homepage because they cannot see the Chinese flag and the site does not automatically redirect to the browser language.
Solution: 1. Ensure that the automatic redirection based on browser language is enabled. This feature should work on all devices, including mobile browsers. You can enable and read more about this feature here: Automatic Redirect Based on Browser Language.
2. To add language flags outside the hamburger menu in Divi theme, custom CSS and JavaScript are required. Here are the steps:
- Add the following CSS in your WordPress Dashboard under Divi > Theme Options > General > Custom CSS:
If these solutions do not apply or are outdated, we 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 further assistance is needed, please open a new support ticket at 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.
My website is in French/Chinese and most of my Chinese mobile users leave the website as soon as they reach the homepage because they can't read French and don't see the Chinese flag.
1)
Are you sure to automatic redirection to browser language works on mobile browsers as well ?
2)
How can I add the Flags next to the hamburger menu ? I am working with DIVI.
before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.
About question 1 )
I am not sure I understand your question. From your debug info I can see that you are not using browser redirection. You can read more here :
Have in mind that the above has many details, especially with Google indexing (you can read details in our documentation) so read it carefully.
About question 2)
As I understand you wish to put the language swither ( flags ) outside the hamburger menu in mobile.
Your theme after a certain view port ( lower screen ) is switching from the normal menu to hamburger menu and adding the same elements from the normal menu to the hambruger.
If you wish to disable the language switcher in the hamburger menu and display them outside it you need custom code, because you need to override the behavior of your theme (Divi )
I had a similar question recently for Divi, you can read more here.
1. That redirect should take place on every browser no matter the device that's used. What is important is that the language set in the browser settings would be corresponding to the language of the user. That's not something that we have control over, unfortunately. But please take into consideration that the feature needs to be enabled first - from what my colleague is mentioning above, it seems that the feature might not be enabled. Please make sure that it is enabled.
2. For adding the language switcher outside of the hamburger menu, you can also check these two existing tickets where the clients were also using Divi and asked for the same thing:
Thank you for both your answers guys, by bad, I forgot to activate the redirection.
I will try to modify the DIVI header and add either the selector or just an image of a flag with a link on the Chinese version of the website, then go to visibility and activate visibility for mobile only.
But, after reading your support post about the switcher :
not sure to understand where to find the shortcode ... just in case adding the widget doesn't work
I am getting back to you to tell you that DIVI helped me with a great solution, instead of recreating a header from scratch with the same design as my theme (which can be tricky for some) they gave me some code to add in the CSS and HTML header.
Here are the instructions :
First, add this custom CSS code in your WordPress Dashboard > Divi > Theme Options > General > Custom CSS:
Thank you for sharing this with us and with the community so that others can also find it and use it.
I am marking this ticket as resolved for now then.
Good luck with the project!
Mihai
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.