aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/index.php
diff options
context:
space:
mode:
authorGraham Eames <grahamje@users.sourceforge.net>2006-10-07 19:07:42 +0000
committerGraham Eames <grahamje@users.sourceforge.net>2006-10-07 19:07:42 +0000
commitd7545025c3a4271d47f6c7a039af79e9cae6a862 (patch)
tree361986e83a3c5b472d89fc4864e83ddb238d311b /phpBB/install/index.php
parent17f25374ad6b74c02cecaa16e809c051e3588233 (diff)
downloadforums-d7545025c3a4271d47f6c7a039af79e9cae6a862.tar
forums-d7545025c3a4271d47f6c7a039af79e9cae6a862.tar.gz
forums-d7545025c3a4271d47f6c7a039af79e9cae6a862.tar.bz2
forums-d7545025c3a4271d47f6c7a039af79e9cae6a862.tar.xz
forums-d7545025c3a4271d47f6c7a039af79e9cae6a862.zip
Make the UTF tools available - recent changes require them in the install and they are likely to be needed in conversion as well
Fix some broken redirects Change the structure of language packs we scan for. (language packs should be named in the form xx-yy - all lowercase with hyphens as the separator) git-svn-id: file:///svn/phpbb/trunk@6461 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/index.php')
-rwxr-xr-xphpBB/install/index.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index c0d5675e4d..96828fb939 100755
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -110,17 +110,18 @@ include($phpbb_root_path . 'includes/template.' . $phpEx);
include($phpbb_root_path . 'includes/acm/acm_file.' . $phpEx);
include($phpbb_root_path . 'includes/cache.' . $phpEx);
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
// Try and load an appropriate language if required
$language = request_var('language', '');
if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language)
{
- $accept_lang_ary = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
+ $accept_lang_ary = explode(',', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
foreach ($accept_lang_ary as $accept_lang)
{
- // Set correct format ... guess full xx_YY form
- $accept_lang = substr($accept_lang, 0, 2) . '_' . strtoupper(substr($accept_lang, 3, 2));
+ // Set correct format ... guess full xx-yy form
+ $accept_lang = substr($accept_lang, 0, 2) . '-' . substr($accept_lang, 3, 2);
if (file_exists($phpbb_root_path . 'language/' . $accept_lang))
{
@@ -129,7 +130,7 @@ if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language)
}
else
{
- // No match on xx_YY so try xx
+ // No match on xx-yy so try xx
$accept_lang = substr($accept_lang, 0, 2);
if (file_exists($phpbb_root_path . 'language/' . $accept_lang))
{
@@ -319,11 +320,11 @@ class module
'PAGE_TITLE' => $this->get_page_title(),
'T_IMAGE_PATH' => $phpbb_root_path . 'adm/images/',
- 'S_USER_LANG' => $language,
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
'S_CONTENT_ENCODING' => 'UTF-8',
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
+ 'S_USER_LANG' => $language,
)
);