aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-10-11 12:18:37 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-10-11 12:18:37 +0000
commit5ed2aa759071b4352714174cf0ddcd4d0323d6e9 (patch)
treeabd807328fb2f31ba1b11387814d34d7a12f962b
parentbb6c0fe235df4d42a514da20e5ff00b20c587d23 (diff)
downloadforums-5ed2aa759071b4352714174cf0ddcd4d0323d6e9.tar
forums-5ed2aa759071b4352714174cf0ddcd4d0323d6e9.tar.gz
forums-5ed2aa759071b4352714174cf0ddcd4d0323d6e9.tar.bz2
forums-5ed2aa759071b4352714174cf0ddcd4d0323d6e9.tar.xz
forums-5ed2aa759071b4352714174cf0ddcd4d0323d6e9.zip
Changed paths for language
git-svn-id: file:///svn/phpbb/trunk@1170 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/faq.php2
-rwxr-xr-xphpBB/includes/emailer.php2
-rw-r--r--phpBB/includes/functions.php19
-rw-r--r--phpBB/install.php5
4 files changed, 15 insertions, 13 deletions
diff --git a/phpBB/faq.php b/phpBB/faq.php
index f78fbd0424..a750e2941c 100644
--- a/phpBB/faq.php
+++ b/phpBB/faq.php
@@ -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")
diff --git a/phpBB/includes/emailer.php b/phpBB/includes/emailer.php
index 0082efda22..b258f3ad8a 100755
--- a/phpBB/includes/emailer.php
+++ b/phpBB/includes/emailer.php
@@ -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__);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 6be4bef80a..2e6ac3ff1f 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -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;
@@ -333,7 +333,7 @@ function generate_activation_key()
$act_key = '';
for($i = 0; $i < 8; $i++)
{
- $act_key .= $chars[rand(0,$max_elements)];
+ $act_key .= $chars[rand(0, $max_elements)];
}
$act_key_md = md5($act_key);
@@ -709,10 +709,11 @@ 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>";
+ $lang_select .= "<option value=\"$filename\"$selected>" . ucwords($displayname) . "</option>";
}
}
$lang_select .= "</select>";
@@ -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 == "")
{
diff --git a/phpBB/install.php b/phpBB/install.php
index 85bee7ef1b..fbd1c5b94b 100644
--- a/phpBB/install.php
+++ b/phpBB/install.php
@@ -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();
}
}
-?>
+
+?> \ No newline at end of file