aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/index.php
diff options
context:
space:
mode:
authorGraham Eames <grahamje@users.sourceforge.net>2006-07-23 16:04:51 +0000
committerGraham Eames <grahamje@users.sourceforge.net>2006-07-23 16:04:51 +0000
commit4cf863dcb32ebbbf4dfbf706d9e00891dd65b8ad (patch)
tree7e06c8e4c6c39b8a0cb0e15209863f330313e949 /phpBB/install/index.php
parent5879c1c5c1e7b0860a76a0fc62f62d171c2488f0 (diff)
downloadforums-4cf863dcb32ebbbf4dfbf706d9e00891dd65b8ad.tar
forums-4cf863dcb32ebbbf4dfbf706d9e00891dd65b8ad.tar.gz
forums-4cf863dcb32ebbbf4dfbf706d9e00891dd65b8ad.tar.bz2
forums-4cf863dcb32ebbbf4dfbf706d9e00891dd65b8ad.tar.xz
forums-4cf863dcb32ebbbf4dfbf706d9e00891dd65b8ad.zip
Changes to the language handling during the install
git-svn-id: file:///svn/phpbb/trunk@6200 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/index.php')
-rwxr-xr-xphpBB/install/index.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 86baa63d59..75819c02a1 100755
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -310,7 +310,9 @@ class module
global $template, $lang, $stage;
$template->assign_vars(array(
+ 'L_CHANGE' => $lang['CHANGE'],
'L_INSTALL_PANEL' => $lang['INSTALL_PANEL'],
+ 'L_SELECT_LANG' => $lang['SELECT_LANG'],
'PAGE_TITLE' => $this->get_page_title(),
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
@@ -629,6 +631,45 @@ class module
return $tpl;
}
+
+ /**
+ * Generate the drop down of available language packs
+ */
+ function inst_language_select($default = '')
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $dir = @opendir($phpbb_root_path . 'language');
+
+ while ($file = readdir($dir))
+ {
+ $path = $phpbb_root_path . 'language/' . $file;
+
+ if (is_file($path) || is_link($path) || $file == '.' || $file == '..' || $file == 'CVS')
+ {
+ continue;
+ }
+
+ if (file_exists($path . '/iso.txt'))
+ {
+ list($displayname) = @file($path . '/iso.txt');
+ $lang[$displayname] = $file;
+ }
+ }
+ @closedir($dir);
+
+ @asort($lang);
+ @reset($lang);
+
+ $user_select = '';
+ foreach ($lang as $displayname => $filename)
+ {
+ $selected = (strtolower($default) == strtolower($filename)) ? ' selected="selected"' : '';
+ $user_select .= '<option value="' . $filename . '"' . $selected . '>' . ucwords($displayname) . '</option>';
+ }
+
+ return $user_select;
+ }
}
?> \ No newline at end of file