-set_up_language(getPref($data_dir, $username, 'language'));
-
-if (isset($use_frames) && !$use_frames) {
- if (!isset($right_frame))
- $right_frame = '';
- if ($right_frame == 'right_main.php') {
- $urlMailbox = urlencode($mailbox);
- $right_frame_url = "right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage";
- } elseif ($right_frame == 'options.php') {
- $right_frame_url = 'options.php';
- } elseif ($right_frame == 'folders.php') {
- $right_frame_url = 'folders.php';
- } else if ($right_frame == '') {
- $right_frame_url = 'right_main.php';
- } else {
- $right_frame_url = $right_frame;
- }
- header("Location: $right_frame_url");
+$err=set_up_language(getPref($data_dir, $username, 'language'));
+
+$output = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\">\n".
+ "<html><head>\n" .
+ "<title>$org_title</title>\n".
+ "</head>";
+
+// Japanese translation used without mbstring support
+if ($err==2) {
+ echo $output.
+ "<body>\n".
+ "<p>You need to have php4 installed with the multibyte string function \n".
+ "enabled (using configure option --enable-mbstring).</p>\n".
+ "<p>System assumed that you accidently switched to Japanese translation \n".
+ "and reverted your language preference to English.</p>\n".
+ "<p>Please refresh this page in order to use webmail.</p>\n".
+ "</body></html>";
+ return;