Just a quick update on this, the author of Polylang pointed me to this article explaining how to get the current lang active.
Plugin Author
DaveE
(@dpe415)
Hi lmartins,
Right now I don’t believe FPW is compatible with Polylang or WPML. I hope to make it compatible in the near future though. Sorry for the trouble!
No need to apologize Dave, thank you for the feedback.
I really love the plugin, haven’t found anything just as flexible, so im hoping it can support languages in the near future.
Plugin Author
DaveE
(@dpe415)
Hi again,
I’m looking into the issues surrounding multilingual widget for FPW. There a lot to consider here. I’m hoping to understand the needs/wants for the widget when using tools like Polylang. Would you be open to helping me understand the use-case a bit more?
Hey David,
Sure, I’m surely deeply interested in that. Do you have any suggestion, is it enough for now if explain it with more detail, maybe including samples on how other widgets approached this issue?
Plugin Author
DaveE
(@dpe415)
Thanks for being willing. Yes, explaining in more detail would be helpful. Here are my thoughts after playing a bit more with Polylang & WPML.
I think it would almost make the most sense for a widget instance to be defined for each language (not mixed) and then only displayed on the front end for that specific language using the multilingual plugin’s setting for when to show a widget.
For example, you’d create one widget that gets English posts from an English category and only shows when English is selected and a second widget to get corresponding Spanish posts from the corresponding Spanish category and only show that widget when Spanish is the selected language. Of course, that means that for each supported language a new widget would need to be created. if there are 5 supported languages, the instance management becomes tedious.
On the other side, it becomes difficult for me to figure out how best to handle showing posts from multiple languages within the same widget instance as the number of possible combinations becomes exponential.
- What are your expectations for how the term selector works with terms for each language (only show the admin language, show all language’s terms, etc)?
- What should happen to a widget that has no results from the current public language?
Thanks again for being willing to help me figure this out. I appreciate it!
Hey Dave, please excuse my delay here.
I think your ideia of having one widget instance per language is the most appropriate too. It also seems to bee the “wordpress way”, since also the way menus work in multi-language environment.
This would absolutely solve my use case scenario.
That being said, I am now looking into a different solution that seems to be recommended as the de facto solution for multi-language wp: http://babbleplugin.com
Not sure if it will work the same way in the way other plugins can figure which language is active.
Plugin Author
DaveE
(@dpe415)
Howdy, I know you’ve moved on, but I wanted to close out this thread. v3.5.0 has WPML and PolyLang support (finally)!
Thanks!