NOT Dexter's Lab

Make Polyglot sidebar work with your custom theme

by on Dec.28, 2007, under Tips and Tricks


If you need to publish the work on your WordPress blog in two or more languages, there is a great chance that you will be using Polyglot. It is a great plugin, works nicely and allows to publish multiple translation of your texts. I tried to enable the language sidebar in my theme, but somehow things got weird (the list was misplaced). Digging through polyglot code, I found a way to fix this behavior. Just follow those few simple steps…

- Enter WordPress Administration Area
- Edit Polyglot Plugin ( Plugins -> Polyglot -> Edit).
- Look for widget_polyglot function (~ line no. 907)
- Look for this line of code

echo $before_widget . $before_title . polyglot_filter($title) . $after_title .'<ul class="language_item">';</ul>

- Delete the class=”language_item” part from this line, which becomes

echo $before_widget . $before_title . polyglot_filter($title) . $after_title .'<ul>';</ul>

- Save your work

Polyglot won’t use its hardcoded style anymore. It will rely on current theme styles for printing the language list. Enjoy ;)

:, , ,

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!