- This topic has 4 replies, 3 voices, and was last updated 9 years, 10 months ago by .
- You must be logged in to reply to this topic.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
I'm working on a bilingual website with WPML, using Genesis as framework. WPML comes with the multilingual textwidget. You can make widgets for different languages or for all languages. Only the widgets which are in the right language are shown on the website.
Yesterday I encountered a little problem. The first widget in the sidebar gets the class widget-first - the last widget-last, en besides that, they get the classes odd or even. I'm very happy with that classes but... they are given to the widget as they are ordered in the sidebar in the backend, not as they are shown on the frontend. So my first widget is Language 1, my second widget is the same widget as widget 1, but in language 2 - so that will be the first widget on the website in language 2. But it gets the class "even" and no class widget-first.
Is it possible to automatic give classes to the widgets as they are on the frontend? I made my workaround for now by using a widget class plugin and add the class widget-first by hand to the second widget (first in other language) - so for now I solved it.
Per a response I received from @WPML on Twitter:
You should have just one widget and translate its content with String Translation. No need for widget per language.
@katootje, I used this plugin called Translate This Button and it works great for my client - http://wordpress.org/extend/plugins/translate-this-button/screenshots/.
Love coffee, chocolate and my Bella!
@Suzan I know - this works for sites I do the content management. But for the end-user I build the site for, the widgets are more user friendly. That is why I use the multilingual text widgets.
@Anitac - I use WPML for all the translations. I can translate (like Susan suggested) the strings with the string translation WPML is offering. So no need for another plugin.. Translation is not the problem.
But thanks for your answers.
Today, working on an other site, I discovered that the first-widget and last-widget classes weren't generated by Genesis as I thought (it was not core WordPerfect, so it had to be the theme). I totally forgot that on that site I had installed a new plugin for the widget classes. Normally I used just Widget Classes and here I installed Widget CSS Classes... and one of the things this plugin does is.... yeah.. giving this first-widget etc classes. So.. maybe they can help out.
© 2023 WPEngine, Inc.