Last Updated: February 25, 2016
·
590
· adziendziel

CSS stylesheet depending on current language

Change CSS stylesheet if user switch to other language. IN addition to the code below you must create an indyvidual stylesheet for each language.

/**
* @file template.php
*/
function mytheme_preprocess_page(&$vars, $hook) {
   $lang_css_path = path_to_theme() . '/css/style_' . i18n_get_lang() . '.css';
  drupal_add_css( $lang_css_path, 'theme', 'all', FALSE);
  $vars['styles'] = drupal_get_css();

}

Warning: This tip works only with Drupal 6