Patch attached - this patch is for the template.php in Zen - all subthemes would inherit.

Comments

matt v.’s picture

I'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.

greg.harvey’s picture

Version: 6.x-1.0-beta3 » 6.x-1.x-dev
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new519 bytes

New 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. ;-)

nhck’s picture

Actually there is the language selector you can use?

http://www.w3.org/International/questions/qa-css-lang

greg.harvey’s picture

That'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.

johnalbin’s picture

Component: PHP Code » layout.css
Status: Reviewed & tested by the community » Closed (won't fix)

I 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).