diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-24 09:42:53 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-24 09:42:53 +0000 |
commit | 7186c4433e85f4f307466e9706b2a62e30a9b173 (patch) | |
tree | 033ae5873052a6108a346da9e259fcdeef3a9ecd /themes/chameleon | |
parent | ff4fd98430669b6355d91c2a5042b116d840d3da (diff) | |
download | brdo-7186c4433e85f4f307466e9706b2a62e30a9b173.tar.gz brdo-7186c4433e85f4f307466e9706b2a62e30a9b173.tar.bz2 |
#208768 by dvessel, Arancaytar: language direction should be in the HTML source, so it is more accessible even without CSS
Diffstat (limited to 'themes/chameleon')
-rw-r--r-- | themes/chameleon/chameleon.theme | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/themes/chameleon/chameleon.theme b/themes/chameleon/chameleon.theme index 4536ec282..8f3a51904 100644 --- a/themes/chameleon/chameleon.theme +++ b/themes/chameleon/chameleon.theme @@ -14,7 +14,8 @@ function chameleon_theme($existing, $type, $theme, $path) { } function chameleon_page($content, $show_blocks = TRUE, $show_messages = TRUE) { - $language = isset($GLOBALS['language']) ? $GLOBALS['language']->language : NULL; + $language = $GLOBALS['language']->language; + $direction = $GLOBALS['language']->direction ? 'rtl' : 'ltr'; if (theme_get_setting('toggle_favicon')) { drupal_set_html_head('<link rel="shortcut icon" href="'. check_url(theme_get_setting('favicon')) .'" type="image/x-icon" />'); @@ -27,7 +28,7 @@ function chameleon_page($content, $show_blocks = TRUE, $show_messages = TRUE) { $blocks_right = theme_blocks('right'); $output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"; - $output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"$language\" xml:lang=\"$language\">\n"; + $output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"$language\" xml:lang=\"$language\" dir=\"$direction\">\n"; $output .= "<head>\n"; $output .= " <title>". ($title ? strip_tags($title) ." | ". variable_get("site_name", "Drupal") : variable_get("site_name", "Drupal") ." | ". variable_get("site_slogan", "")) ."</title>\n"; $output .= drupal_get_html_head(); |