diff --git a/include/ajax.tips.php b/include/ajax.tips.php
index e81d1301b53622478520050bcd6e75528b28e36e..aa1c9bfe14355ba8b5bf9545483cc73b30cf29a0 100644
--- a/include/ajax.tips.php
+++ b/include/ajax.tips.php
@@ -23,10 +23,7 @@ class HelpTipAjaxAPI extends AjaxController {
     function getTipsJson($namespace, $lang=false) {
         global $ost, $thisstaff;
 
-        if (!$lang)
-            $lang = ($thisstaff)
-                ? $thisstaff->getLanguage()
-                : Internationalization::getDefaultLanguage();
+        $lang = Internationalization::getCurrentLanguage();
 
         $i18n = new Internationalization($lang);
         $tips = $i18n->getTemplate("help/tips/$namespace.yaml");
diff --git a/setup/css/wizard.css b/setup/css/wizard.css
index 2dd02eced36596ac0fb570c21a6205e58de00023..391f85f71acf615670cf0a45c745cac2d4d2f5a3 100644
--- a/setup/css/wizard.css
+++ b/setup/css/wizard.css
@@ -1,5 +1,5 @@
 @import url("../../css/font-awesome.min.css");
-body { background: url('../images/background.jpg?1312906017') top left repeat-x white; font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #000; margin: 0; padding: 0; }
+body { background: url('../images/background.jpg?1312906017') top left repeat-x white; font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #000; margin: 0; padding: 0; line-height: 1.3em; }
 
 #wizard { background: #fff; width: 800px; margin: 30px auto; padding: 10px; border: 1px solid #2a67ac; border-right: 2px solid #2a67ac; border-bottom: 3px solid #2a67ac; overflow: hidden; margin-bottom:5px;}
 
@@ -11,16 +11,16 @@ a { color: #2a67ac; }
 .hidden { display: none;}
 .error { color:#f00;}
 
-#header { height: 72px; margin-bottom: 20px; }
+#header { height: 72px; margin-bottom: 20px; width: 100%; }
 #header #logo { width: 280px; height: 72px; display: block; float: left; }
-#header ul { margin: 0; padding: 0; width: 400px; float: right; text-align: right; }
-#header ul .info { font-size: 11pt; font-weight: bold; border-bottom: 1px solid #2a67ac; color: #444; }
+#header .info { font-size: 11pt; font-weight: bold; border-bottom: 1px solid #2a67ac; color: #444; text-align: right; float: right; }
+#header ul { margin: 0; padding: 0; text-align: right; }
 #header ul li { list-style: none; margin: 5px 0 0 0; padding: 0; }
 #header ul li a { color: #F3811C; text-decoration: none; }
 #header ul li a:hover { color: #2a67ac; }
 
 #sidebar { width: 180px; padding: 10px; border: 1px solid #C8DDFA; float: right; background: #F7FBFE; }
-#sidebar h3 { font-size: 10pt; margin: 0 0 5px 0; padding: 0; text-indent: 32px; background: url('../images/cog.png?1312913866') top left no-repeat; line-height: 24px; color: #2a67ac; }
+#sidebar h3 { font-size: 10pt; margin: 0 0 5px 0; padding: 0; padding-left: 32px; background: url('../images/cog.png?1312913866') top left no-repeat; line-height: 1.2em; color: #2a67ac; min-height: 24px; }
 
 #footer { color:#ccc; }
 #footer a, #footer a:hover { text-decoration:none; color:#ccc; }
@@ -42,6 +42,10 @@ ul.progress li.no { background-image: url('../images/no.png?1312906277'); }
 ul.progress li.yes small {color:green; }
 ul.progress li.no small {color:red;}
 
+#intro ul li + li {
+    margin-top: 8px;
+}
+
 #bar { clear: both; padding-top: 10px; height: 24px; line-height: 24px; text-align: center; border-top: 1px solid #aaaaaa; }
 #bar a, #bar .btn { display: inline-block; margin: 0; height: 24px; line-height: 24px; font-weight: bold; border: 1px solid #666666; text-decoration: none; padding: 0 10px; background: url('../images/grey_btn_bg.png?1312910883') top left repeat-x; color: #333; }
 #bar a:hover, #bar .btn:hover, #bar .btnover { background-position: bottom left; }
@@ -56,9 +60,9 @@ form h4.system { background-image: url('../images/system.png?1262713696'); }
 form h4.admin { background-image: url('../images/user.png?1262713720'); }
 form h4.database { background-image: url('../images/database.png?1262713698'); }
 form h4.email { background-image: url('../images/email.png?1142218352'); }
-form .row { clear: both; padding: 2px 0 0 24px; background: #F7FBFE; height: 24px; }
-form .row input { background: #fff; height: 22px; padding: 0; line-height: 22px; border: 1px solid #cccccc; }
-form .row label, form .row span { display: block; float: left; width: 150px; line-height: 24px; }
+form .row { clear: both; padding: 2px 0 0 24px; background: #F7FBFE; }
+form .row input { background: #fff; height: 22px; padding: 0 5px; line-height: 22px; border: 1px solid #cccccc; }
+form .row label, form .row span { display: block; line-height: 24px; padding: 0 5px; }
 form .row span { width: 600px; color: #666666; }
 
 .tip_box {
@@ -109,7 +113,7 @@ form .row span { width: 600px; color: #666666; }
     position:absolute;
     top:0;
     left:-1px;
-    min-width:300px;
+    min-width:400px;
     line-height: 1.15rem;
 }
 
@@ -178,6 +182,23 @@ i.help-tip:hover {
 #loading { padding: 10px 10px 10px 60px; width: 400px; height: 150px; background: url('../images/ajax-loader.gif?1312925608') 10px 50% no-repeat white; position: fixed; display: none; z-index: 3000; }
 #loading h4 { margin: 3px 0 0 0; padding: 0; color: #d80; }
 
-.tip { display: inline-block; width: 16px; height: 16px; outline: none; text-decoration: none; color: #d80; }
+div.flags { text-align: right; margin-top: 5px; }
+a.flag { text-decoration: none; }
+
+.tip { display: inline-block; width: 16px; height: 16px; outline: none; text-decoration: none; color: #d80; margin-left: 5px; }
+.rtl .tip { margin-right: 5px;}
 
 #links { margin: 10px 0; }
+
+.rtl ul.progress li.yes, .rtl ul.progress li.no { background-position: 100%; }
+.rtl ul.progress li { padding-left: 0; padding-right: 24px; }
+.rtl form h4.head { padding-right: 24px; background-position: right center; background-position: calc(100% - 5px); }
+.rtl form .subhead { padding-right: 24px; }
+.rtl #header #logo { float: right; }
+.rtl #header .info, .rtl #header ul, .rtl div.flags { text-align:left; }
+.rtl #header .info { float: left; }
+.rtl .ltr { text-align: right; }
+.ltr {
+    direction: ltr;
+    unicode-bidi: embed;
+}
diff --git a/setup/inc/file-perm.inc.php b/setup/inc/file-perm.inc.php
index 78c65c7c84cf5058eabfce23903bdf607e76e136..0640bd547f9d04fb18fccd6bbe955a715a91c618 100644
--- a/setup/inc/file-perm.inc.php
+++ b/setup/inc/file-perm.inc.php
@@ -7,15 +7,15 @@ if(!defined('SETUPINC')) die('Kwaheri!');
             <p> <?php
             echo sprintf(
                  __('osTicket installer requires ability to write to the configuration file %s'),
-                 '<b>include/ost-config.php</b>');?>
+                 '<b style="white-space:nowrap">include/ost-config.php</b>');?>
              </p>
             </div>
             <h3><?php echo __('Solution');?>: <font color="red"><?php echo $errors['err']; ?></font></h3>
             <?php echo __('Please follow the instructions below to give read and write access to the web server user.');?>
             <ul>
-                <li><b><?php echo __('CLI');?></b>:<br><i>chmod 0666  include/ost-config.php</i></li>
+                <li><b><?php echo __('CLI');?></b>:<br><i class="ltr">chmod 0666  include/ost-config.php</i></li>
                 <li><b><?php echo __('Windows PowerShell');?></b>:<br><?php echo __('Add "Full Access" permission for the "Everyone" user'); ?><br>
-                <i>icacls include\ost-config.php /grant 'Everyone:F'</i></li>
+                <i class="ltr">icacls include\ost-config.php /grant 'Everyone:F'</i></li>
                 <li><b><?php echo __('FTP');?></b>:<br><?php echo __('Using WS_FTP this would be right hand clicking on the file, selecting chmod, and then giving all permissions to the file.');?></li>
                 <li><b><?php echo __('Cpanel');?></b>:<br><?php echo __('Click on the file, select change permission, and then giving all permissions to the file.');?></li>
             </ul>
@@ -24,7 +24,7 @@ if(!defined('SETUPINC')) die('Kwaheri!');
             <div id="bar">
                 <form method="post" action="install.php">
                     <input type="hidden" name="s" value="config">
-                    <input class="btn"  type="submit" name="submit" value="<?php echo __('Done? Continue');?> &raquo;">
+                    <button class="btn"  type="submit" name="submit"><?php echo __('Done? Continue');?> &raquo;</button>
                 </form>
             </div>
     </div>
diff --git a/setup/inc/header.inc.php b/setup/inc/header.inc.php
index 7e8a24dc4c40b504dae15942fe73aff08812a7a9..b7530d1ce8df63df7e5abe99b392629a075b1d27 100644
--- a/setup/inc/header.inc.php
+++ b/setup/inc/header.inc.php
@@ -1,10 +1,16 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
     "http://www.w3.org/TR/html4/loose.dtd">
-<html>
+<html <?php
+if (($lang = Internationalization::getCurrentLanguage())
+        && ($info = Internationalization::getLanguageInfo($lang))
+        && (@$info['direction'] == 'rtl'))
+    echo 'dir="rtl" class="rtl"';
+?>>
 <head>
     <title><?php echo $wizard['title']; ?></title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <link rel="stylesheet" href="css/wizard.css">
+    <link type="text/css" rel="stylesheet" href="<?php echo ROOT_PATH; ?>css/flags.css">
     <script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
     <script type="text/javascript" src="js/tips.js"></script>
     <script type="text/javascript" src="js/setup.js"></script>
@@ -13,8 +19,9 @@
     <div id="wizard">
         <div id="header">
             <img id="logo" src="./images/<?php echo $wizard['logo']?$wizard['logo']:'logo.png'; ?>" width="280" height="72" alt="osTicket">
-            <ul>
-                <li class="info"><?php echo $wizard['tagline']; ?></li>
+            <div class="info"><?php echo $wizard['tagline']; ?></div>
+            <br/>
+            <ul class="links">
                 <li>
                    <?php
                    foreach($wizard['menu'] as $k=>$v)
@@ -23,5 +30,20 @@
                     <a target="_blank" href="http://osticket.com/contact-us"><?php echo __('Contact Us');?></a>
                 </li>
             </ul>
+            <div class="flags">
+<?php
+if (($all_langs = Internationalization::availableLanguages())
+    && (count($all_langs) > 1)
+) {
+    foreach ($all_langs as $code=>$info) {
+        list($lang, $locale) = explode('_', $code);
+?>
+        <a class="flag flag-<?php echo strtolower($locale ?: $info['flag'] ?: $lang); ?>"
+            href="?<?php echo urlencode($_GET['QUERY_STRING']); ?>&amp;lang=<?php echo $code;
+            ?>" title="<?php echo Internationalization::getLanguageDescription($code); ?>">&nbsp;</a>
+<?php }
+} ?>
+            </div>
         </div>
+        <div class="clear"></div>
         <div id="content">
diff --git a/setup/inc/install-prereq.inc.php b/setup/inc/install-prereq.inc.php
index 54a0421a68fd16fa44ba7b6118f97f813d24fd73..4c3167e6b71e07a85a32eed73f7ef0ac4bcb57f5 100644
--- a/setup/inc/install-prereq.inc.php
+++ b/setup/inc/install-prereq.inc.php
@@ -15,10 +15,10 @@ if(!defined('SETUPINC')) die('Kwaheri!');
             <?php echo __('These items are necessary in order to install and use osTicket.');?>
             <ul class="progress">
                 <li class="<?php echo $installer->check_php()?'yes':'no'; ?>">
-                <?php echo sprintf(__('%s or greater'), 'PHP v5.3');?> &mdash; (<small><b><?php echo PHP_VERSION; ?></b></small>)</li>
+                <?php echo sprintf(__('%s or greater'), '<span class="ltr">PHP v5.3</span>');?> &mdash; <small class="ltr">(<b><?php echo PHP_VERSION; ?></b>)</small></li>
                 <li class="<?php echo $installer->check_mysql()?'yes':'no'; ?>">
-                <?php echo __('MySQLi extension for PHP');?> &mdash; (<small><b><?php
-                    echo extension_loaded('mysqli')?__('module loaded'):__('missing!'); ?></b></small>)</li>
+                <?php echo __('MySQLi extension for PHP');?> &mdash; <small><b><?php
+                    echo extension_loaded('mysqli')?__('module loaded'):__('missing!'); ?></b></small></li>
             </ul>
             <h3><?php echo __('Recommended');?>:</h3>
             <?php echo __('You can use osTicket without these, but you may not be able to use all features.');?>
diff --git a/setup/inc/install.inc.php b/setup/inc/install.inc.php
index daa1170b233b8d4584153fd089e857c9f40fa794..807be16fda249a64a3550be5bfc39d891a25b1fd 100644
--- a/setup/inc/install.inc.php
+++ b/setup/inc/install.inc.php
@@ -12,7 +12,7 @@ $info=($_POST && $errors)?Format::htmlchars($_POST):array('prefix'=>'ost_','dbho
                 <span class="subhead"><?php echo __('The URL of your helpdesk, its name, and the default system email address');?></span>
                 <div class="row">
                     <label><?php echo __('Helpdesk URL');?>:</label>
-                    <span><strong><?php echo URL; ?></strong></span>
+                    <span class="ltr"><strong><?php echo URL; ?></strong></span>
                 </div>
                 <div class="row">
                     <label><?php echo __('Helpdesk Name');?>:</label>
@@ -33,7 +33,7 @@ $info=($_POST && $errors)?Format::htmlchars($_POST):array('prefix'=>'ost_','dbho
 <?php foreach($langs as $l) {
     $selected = ($info['lang_id'] == $l['code']) ? 'selected="selected"' : ''; ?>
                     <option value="<?php echo $l['code']; ?>" <?php echo $selected;
-                        ?>><?php echo $l['desc']; ?></option>
+                        ?>><?php echo Internationalization::getLanguageDescription($l['code']); ?></option>
 <?php } ?>
                 </select>
                 <a class="tip" href="#default_lang"><i class="icon-question-sign help-tip"></i></a>
diff --git a/setup/js/tips.js b/setup/js/tips.js
index af111e21ed7171f4e33b4f45256fc09be29d70d0..1e35d976897cfc3cd121f3a8cb0ad195eb55fecf 100644
--- a/setup/js/tips.js
+++ b/setup/js/tips.js
@@ -40,9 +40,11 @@ jQuery(function($) {
                     "left":x_pos + "px"
                 }),
             tip_timer = setTimeout(function() {
+                var rtl = $('html.rtl').length > 0;
                 $('.tip_box').remove();
                 $('body').append(the_tip.hide().fadeIn());
-                if ($(window).width() < tip_content.outerWidth() + the_tip.position().left) {
+                if ((rtl && ($(window).width() > tip_content.outerWidth() + the_tip.position().left))
+                        || (!rtl && ($(window).width() < tip_content.outerWidth() + the_tip.position().left))) {
                     the_tip.css({'left':x_pos-tip_content.outerWidth()-40+'px'});
                     tip_box.addClass('right');
                     tip_arrow.addClass('flip-x');
diff --git a/setup/setup.inc.php b/setup/setup.inc.php
index 942dce953bae422962ddc0955e58babafe1e9d2b..035a8333d8786500f49e622a87763603b70ca52a 100644
--- a/setup/setup.inc.php
+++ b/setup/setup.inc.php
@@ -63,4 +63,13 @@ require_once INCLUDE_DIR.'class.i18n.php';
 
 Internationalization::bootstrap();
 
+// Set browser-preferred language (if installed)
+require_once INCLUDE_DIR.'class.translation.php';
+
+// Support flags in the setup portal too
+if (isset($_GET['lang']) && $_GET['lang']) {
+    $_SESSION['client:lang'] = $_GET['lang'];
+}
+TextDomain::configureForUser();
+
 ?>