From d5a0e61b33283eb5e0f042cfd29ab6f8bbd5ae02 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 18 Jun 2008 10:06:36 +0000 Subject: Fixes #19: Default language selector http://trac.elgg.org/elgg/ticket/19 git-svn-id: https://code.elgg.org/elgg/trunk@960 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/admin/site/update_basic.php | 4 +++- actions/systemsettings/install.php | 4 +++- engine/lib/configuration.php | 2 ++ languages/en.php | 3 ++- views/default/settings/system.php | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/actions/admin/site/update_basic.php b/actions/admin/site/update_basic.php index 4ad80ca96..25500067a 100644 --- a/actions/admin/site/update_basic.php +++ b/actions/admin/site/update_basic.php @@ -27,7 +27,9 @@ $site->url = get_input('wwwroot'); datalist_set('path',get_input('path')); - datalist_set('dataroot',get_input('dataroot')); + datalist_set('dataroot',get_input('dataroot')); + + set_config('language', get_input('language'), $site->getGUID()); system_message(elgg_echo("admin:configuration:success")); diff --git a/actions/systemsettings/install.php b/actions/systemsettings/install.php index b56a86f6c..06a40e167 100644 --- a/actions/systemsettings/install.php +++ b/actions/systemsettings/install.php @@ -31,7 +31,9 @@ datalist_set('path',get_input('path')); datalist_set('dataroot',get_input('dataroot')); - datalist_set('default_site',$site->getGUID()); + datalist_set('default_site',$site->getGUID()); + + set_config('language', get_input('language'), $site->getGUID()); system_message(elgg_echo("installation:configuration:success")); diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php index 48eeeebfc..acb651170 100644 --- a/engine/lib/configuration.php +++ b/engine/lib/configuration.php @@ -129,6 +129,8 @@ if (empty($CONFIG->sitename)) $CONFIG->sitename = "New Elgg site"; + if (empty($CONFIG->language)) + $CONFIG->language = "en"; } diff --git a/languages/en.php b/languages/en.php index 20642374b..12d4d8c2f 100644 --- a/languages/en.php +++ b/languages/en.php @@ -348,7 +348,8 @@ Alternatively, you can enter your database settings below and we will try and do 'sitename' => "The name of your site (eg \"My social networking site\"):", 'wwwroot' => "The site URL, followed by a trailing slash:", 'path' => "The full path to your site root on your disk, followed by a trailing slash:", - 'dataroot' => "The full path to the directory where uploaded files will be stored, followed by a trailing slash:", + 'dataroot' => "The full path to the directory where uploaded files will be stored, followed by a trailing slash:", + 'language' => "Please enter the default language code for your site, e.g. 'en' for English, 'fr' for French, 'ru' for Russian:", /** * Welcome diff --git a/views/default/settings/system.php b/views/default/settings/system.php index 5f4e36f1e..ba3e614ee 100644 --- a/views/default/settings/system.php +++ b/views/default/settings/system.php @@ -27,7 +27,7 @@

-- cgit v1.2.3