March 22, 2013 at 4:30 am #30401
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.
KarinMarch 23, 2013 at 11:04 am #30718
SusanModeratorPost count: 7982
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.
March 23, 2013 at 12:02 pm #30739
anitacParticipantPost count: 6991
@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/.
March 24, 2013 at 6:10 am #30846
@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.March 26, 2013 at 8:43 am #31312
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.
You must be logged in to reply to this topic.