Normally, WordPress allows to display the widget based on current language using (get_locale() == ‘en_US’)
When I add a widget to a custom Sidebar Menu created via your plugin, I cannot select visibility based on language.
How can I achieve that please?
Thanks,
Alain
I could achieve it using Translate Press shortcode :
[trp_language language=”en_US”]
<br>
<form><input style=”background: #005096;cursor: pointer; color: white; font-size: 20px; width: 240px; height: 40px; border-radius: 20px;” type=”button” value=”Effacer les Filtres” onclick =”window.open(‘https://washyourworld.org/en/videotheque’,’_self’)”/></form>
[/trp_language]
[trp_language language=”fr_FR”]
<br>
<form><input style=”background: #005096;cursor: pointer; color: white; font-size: 20px; width: 240px; height: 40px; border-radius: 20px;” type=”button” value=”Effacer les Filtres” onclick =”window.open(‘https://washyourworld.org/videotheque’,’_self’)”/></form>
[/trp_language]
But I am still interested if you can include that option in your plugin directly. Would be great 🙂
Hi Alain,
It doesn’t look like the Advanced Sidebar Menu plugin is being used on the example page.
It appears DIVI is being used to create the layouts and sidebars. Most likely a theme which supports the DIVI Builder. It may be helpful to reach out to the author of DIVI and see if they have a solution for integrating the Translate Press settings into the DIVI widgets.
I’m not familiar with Translate Press nor very familiar with DIVI but after doing a quick search it looks like your technique of using the shortcode and the custom HTML widget is a good solution.
If you need any help integrating a language specific Advanced Sidebar menu or menu items, please let me know.
Have a great day!