Created
September 28, 2012 17:02
-
-
Save Mouad-BGD/3800984 to your computer and use it in GitHub Desktop.
Omega theme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We had the same issue, we needed to have a specific css per language to fine tune the presentation. We also needed this css file to load last. We did as follows: | |
1. Under the subtheme folder we added a branding folder containg a folder for each language where we added each of the css files. ie. themes/subtheme/branding/ar/styles.css (for arabic), themes/subtheme/branding/zh/styles.css (for chinese), themes/subtheme/branding/en/styles.css (for english) ... etc. | |
2. Then we modified the template.php file adding the following lines at the end, right before the closing of php ( ?> ): | |
function subtheme_preprocess_page(&$variables) { | |
global $language; | |
// load the specific styles per language | |
drupal_add_css(path_to_theme() . '/branding/'. $language->language .'/styles.css', array( 'group' => CSS_THEME , 'weight' => 99,'preprocess' => 1)); | |
} | |
You should replace the 'subtheme' word in the above lines with whatever you called your subtheme. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment