I am creating multilingual sites and want to change styles based on what language a page is displayed in. Many browsers allow you to define styles that only apply to the specified language, eg. #page-top:lang(en). However IE7 and earlier and all versions of Safari ignore the lang declaration. So instead I would like to add a language specifier as a style in the body declaration. For example
<body class="wordpress ..... lang-en"
I have found the part of header.php that I need to modify in my child theme, inserting PHP code that extracts the language from my page/post, thanks to the WPML multilingual plugin.
<body class="<?php thematic_body_class() ?> lang-<?php echo ICL_LANGUAGE_CODE?>">
However I suspect that header.php is likely to change in future versions of Thematic, so would like to find a way of using a hook, filter or something upgrade safe that would allow me to make this addition to the body.
Any suggestions, please?