Patch attached - this patch is for the template.php in Zen - all subthemes would inherit.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 456096-zen_language_classes.patch | 519 bytes | greg.harvey |
| add-lang-class.patch | 405 bytes | alexiscott |
Patch attached - this patch is for the template.php in Zen - all subthemes would inherit.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 456096-zen_language_classes.patch | 519 bytes | greg.harvey |
| add-lang-class.patch | 405 bytes | alexiscott |
Comments
Comment #1
matt v. commentedI'm not 100% sure this feedback applies because I'm not using Zen; however, I borrowed the zen_preprocess_page function for my own theme. I needed to also add the language body class, but I had to change $language->prefix to $language->language to get it to work. The $language->prefix variable was empty on my pages for some reason, but $language->language worked great.
Comment #2
greg.harveyNew patch doing this "properly" (e.g. adding a new element to the $classes array prior to building the body_classes variable) attached. Marking R&TBC, because I've just used this on a production site and it's fine. And this issue is ages old - be good for multilingual site builders to get this in to the next release. ;-)
Comment #3
nhck commentedActually there is the language selector you can use?
http://www.w3.org/International/questions/qa-css-lang
Comment #4
greg.harveyThat's cool. Didn't know about that. It probably does negate the need for this patch, but it's little known, so in a way the class is easier because it's obvious to all.
Comment #5
johnalbinI think we've gone a bit body class crazy in Drupal 7. This type of class is really easy to add if you need it. But I think the vast majority of sites are single language sites (sites in Europe being an exception).