• I need to change some CSS on a site with 9 different languages. This could either be achieved by:

    1) Adding a secondary style sheet for each language.

    2) Adding a class per language to the opening <body> tag.

    Does anyone know how to accomplish either of these?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter orangjul

    (@orangjul)

    In case any body cares, I found the answer. You have to add this to your functions.php file:

    <?php
    add_filter('body_class', 'append_language_class');
    function append_language_class($classes){
      $classes[] = ICL_LANGUAGE_CODE;  //or however you want to name your class based on the language code
      return $classes;
    }
    ?>

    Your a lifesaver…. I have just come up against the same problem… this was the first item that came up in my search… and it works great… good times… Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WPML and CSS per language’ is closed to new replies.