Posted by arcX on May 7, 2009 at 8:57am
| Project: | Zen |
| Version: | 6.x-1.x-dev |
| Component: | PHP Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
| Issue tags: | language |
Issue Summary
Patch attached - this patch is for the template.php in Zen - all subthemes would inherit.
| Attachment | Size |
|---|---|
| add-lang-class.patch | 405 bytes |
Comments
#1
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.
#2
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. ;-)
#3
Actually there is the language selector you can use?
http://www.w3.org/International/questions/qa-css-lang
#4
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.