Changed paths for language

git-svn-id: file:///svn/phpbb/trunk@1170 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-10-11 12:18:37 +00:00
parent bb6c0fe235
commit 5ed2aa7590
4 changed files with 15 additions and 13 deletions

View file

@ -34,7 +34,7 @@ init_userprefs($userdata);
//
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
include($phpbb_root_path . 'language/faq_' . $board_config['default_lang'] . '.' . $phpEx);
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_faq.' . $phpEx);
$template->set_filenames(array(
"body" => "faq_body.tpl")

View file

@ -89,7 +89,7 @@ class emailer
global $board_config;
$phpbb_root_path = "./";
$template_file = $phpbb_root_path . "language/email/" . $template_file . "_" . $board_config['default_lang'] . ".tpl";
$template_file = $phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/email/" . $template_file . ".tpl";
if (!file_exists($template_file))
{
message_die(GENERAL_ERROR, "Couldn't find template file: $template_file", "", __LINE__, __FILE__);

View file

@ -268,13 +268,13 @@ function init_userprefs($userdata)
}
}
if(file_exists("language/lang_".$board_config['default_lang'].".".$phpEx) )
if(file_exists("language/lang_".$board_config['default_lang']."/lang_main.".$phpEx) )
{
include($phpbb_root_path . 'language/lang_'.$board_config['default_lang'].'.'.$phpEx);
include($phpbb_root_path . 'language/lang_'.$board_config['default_lang'].'/lang_main.'.$phpEx);
}
else
{
include($phpbb_root_path . 'language/lang_english.'.$phpEx);
include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx);
}
return;
@ -709,8 +709,9 @@ function language_select($default, $select_name = "language", $dirname="language
if (ereg("^lang_", $file))
{
$filename = str_replace("lang_", "", $file);
$filename = str_replace(".$phpEx", "", $filename);
$displayname = preg_replace("/(.*)_(.*)/", "\\1 [ \\2 ]", $filename);
$selected = (strtolower($default) == strtolower($filename)) ? " selected=\"selected\"" : "";
$lang_select .= "<option value=\"$filename\"$selected>" . ucwords($displayname) . "</option>";
}
@ -1048,11 +1049,11 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "",
{
if( !empty($board_config['default_lang']) )
{
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '.'.$phpEx);
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx);
}
else
{
include($phpbb_root_path . 'language/lang_english.'.$phpEx);
include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx);
}
}
@ -1111,7 +1112,7 @@ function message_die($msg_code, $msg_text = "", $msg_title = "", $err_line = "",
// Critical errors mean we cannot rely on _ANY_ DB information being
// available so we're going to dump out a simple echo'd statement
//
include($phpbb_root_path . 'language/lang_english.'.$phpEx);
include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx);
if($msg_text == "")
{

View file

@ -160,7 +160,7 @@ include($phpbb_root_path.'includes/sessions.'.$phpEx);
//
// Import language file, setup template ...
//
include($phpbb_root_path.'language/lang_' . $language . '.'.$phpEx);
include($phpbb_root_path.'language/lang_' . $language . '/lang_main.'.$phpEx);
$template = new Template($phpbb_root_path . "templates/" . $default_template);
@ -507,4 +507,5 @@ else
exit();
}
}
?>