diff options
author | momo-i <momo-i@ampache> | 2009-05-06 13:15:22 +0000 |
---|---|---|
committer | momo-i <momo-i@ampache> | 2009-05-06 13:15:22 +0000 |
commit | da6a97ce353e94f0f68968a02679364419cd7576 (patch) | |
tree | 1c9310441d1f2c051e7e6a94a6f29c68ad7cca75 | |
parent | dd9ecaa106f5d6f137b6ecb772830db03269ee0b (diff) | |
download | ampache-da6a97ce353e94f0f68968a02679364419cd7576.tar.gz ampache-da6a97ce353e94f0f68968a02679364419cd7576.tar.bz2 ampache-da6a97ce353e94f0f68968a02679364419cd7576.zip |
Update HTML header for RTL language.
add debug_event for stream type check
-rw-r--r-- | lib/general.lib.php | 8 | ||||
-rw-r--r-- | stream.php | 1 | ||||
-rw-r--r-- | templates/header.inc.php | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/lib/general.lib.php b/lib/general.lib.php index 13b9d1b6..73f488bb 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -349,6 +349,14 @@ function get_languages() { } // get_languages /** + * is_rtl + * This checks whether to be a rtl language. + */ +function is_rtl($locale) { + return in_array($locale, array("he_IL", "fa_IR", "ar_SA")); +} + +/** * format_time * This formats seconds into minutes:seconds * //FIXME This should be removed, no reason for it! @@ -160,6 +160,7 @@ switch ($_REQUEST['method']) { } /* Start the Stream */ + debug_event('stream.php' , 'Stream Type: '.$stream_type.' Media IDs: '.$media_ids, '5'); $stream = new Stream($stream_type,$media_ids); $stream->add_urls($urls); $stream->start(); diff --git a/templates/header.inc.php b/templates/header.inc.php index 5fb07994..1566aa44 100644 --- a/templates/header.inc.php +++ b/templates/header.inc.php @@ -24,9 +24,10 @@ if (INIT_LOADED != '1') { exit; } $web_path = Config::get('web_path'); $htmllang = str_replace("_","-",Config::get('lang')); $location = get_location(); +$dir = is_rtl() ? "rtl" : "ltr"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>" dir="<?php echo $dir;?>"> <head> <link rel="shortcut icon" href="<?php echo $web_path; ?>/favicon.ico" /> |