Posted By

fadehelix on 02/03/11


Tagged

drupal


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

mlangfeld
AllKnightAccess


Drupal - dynamically Load CSS for specific language


 / Published in: PHP
 

  1. /*template.php*/
  2.  
  3. function mytheme_preprocess_page(&$vars, $hook) {
  4. /*Add language specific css files*/
  5. $lang_css_path = path_to_theme().'/css/style_'.i18n_get_lang().'.css';
  6. drupal_add_css( $lang_css_path, 'theme', 'all', FALSE);
  7. $vars['styles'] = drupal_get_css();
  8. }

Report this snippet  

You need to login to post a comment.