CSS stylesheet depending on current language

Public

Change CSS stylesheet if user switch to other language.

Get raw version
php
  1. function mytheme_preprocess_page(&$vars, $hook) {
  2. //Before You will use this code You must create an indvidual stylesheet for each language
  3. $lang_css_path = path_to_theme() . '/css/style_' . i18n_get_lang() . '.css';
  4. drupal_add_css( $lang_css_path, 'theme', 'all', FALSE);
  5. $vars['styles'] = drupal_get_css();
  6.  
  7. }