diff --git a/htdocs/install/database.php b/htdocs/install/database.php index 4fe0651e1b3..6b8528ea861 100644 --- a/htdocs/install/database.php +++ b/htdocs/install/database.php @@ -20,14 +20,18 @@ * */ -$conf = "../conf/conf.php"; +include_once("./inc.php"); -if (is_readable($conf)) +$setuplang=$_POST["selectlang"]; +$langs->defaultlang=$setuplang; +$langs->load("install"); + + +if (is_readable($conffile)) { - include ($conf); + include_once($conffile); } -include("./inc.php"); pHeader(); diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index 6f9a60d33b0..d1ad05514dc 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -31,12 +31,14 @@ include_once("./inc.php"); +$setuplang=$_POST["selectlang"]; +$langs->defaultlang=$setuplang; +$langs->load("install"); + pHeader("Fichier de configuration","etape2"); $etape = 1; -$conffile = "../conf/conf.php"; - // Répertoire des pages dolibarr $main_dir=isset($_POST["main_dir"])?$_POST["main_dir"]:''; diff --git a/htdocs/install/etape2.php b/htdocs/install/etape2.php index a82062f91f6..e7aa01d16e9 100644 --- a/htdocs/install/etape2.php +++ b/htdocs/install/etape2.php @@ -20,15 +20,19 @@ * $Source$ * */ -include("./inc.php"); +include_once("./inc.php"); + +$setuplang=$_POST["selectlang"]; +$langs->defaultlang=$setuplang; +$langs->load("install"); + pHeader("Création des objets de la base","etape4"); $etape = 2; -$conf = "../conf/conf.php"; -if (file_exists($conf)) +if (file_exists($conffile)) { - include($conf); + include_once($conffile); } if($dolibarr_main_db_type == "mysql") diff --git a/htdocs/install/etape4.php b/htdocs/install/etape4.php index 54b5db20914..e6834c801f0 100644 --- a/htdocs/install/etape4.php +++ b/htdocs/install/etape4.php @@ -21,12 +21,17 @@ * $Source$ * */ -include("./inc.php"); +include_once("./inc.php"); + +$setuplang=$_POST["selectlang"]; +$langs->defaultlang=$setuplang; +$langs->load("install"); + pHeader("Création du compte administrateur","etape5"); -$conf = "../conf/conf.php"; -if (file_exists($conf)) + +if (file_exists($conffile)) { - include($conf); + include_once($conffile); } if($dolibarr_main_db_type == "mysql") diff --git a/htdocs/install/etape5.php b/htdocs/install/etape5.php index f33f22c7be8..33c568e4bc6 100644 --- a/htdocs/install/etape5.php +++ b/htdocs/install/etape5.php @@ -28,13 +28,17 @@ \version $Revision$ */ -include("./inc.php"); +include_once("./inc.php"); + +$setuplang=$_POST["selectlang"]; +$langs->defaultlang=$setuplang; +$langs->load("install"); + $success=0; -$conf = "../conf/conf.php"; -if (file_exists($conf)) +if (file_exists($conffile)) { - include($conf); + include($conffile); } diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index c2cd86dc1cc..34732dfcf77 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -29,13 +29,16 @@ \version $Revision$ */ -include("./inc.php"); +include_once("./inc.php"); + +$setuplang=$_POST["selectlang"]; +$langs->defaultlang=$setuplang; +$langs->load("install"); + pHeader("Fichier de configuration","etape1"); -$conf = "../conf/conf.php"; - // Ici, le fichier conf.php existe et est forcément editable car le test a été fait précédemment. -include($conf); +include_once($conffile); print '
| '.$langs->trans("DefaultLanguage").' : | '; +print ' | '; +print '
';
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 2f85ae32af2..7ffd3111af7 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1,5 +1,6 @@
# Dolibarr language file - en_US - admin
Version=Version
+DolibarrSetup=Dolibarr setup
GlobalSetup=Global setup
GUISetup=GUI setup
DictionnarySetup=Dictionnary setup
diff --git a/htdocs/langs/en_US/install.lang b/htdocs/langs/en_US/install.lang
new file mode 100644
index 00000000000..9b68ce9f0db
--- /dev/null
+++ b/htdocs/langs/en_US/install.lang
@@ -0,0 +1,3 @@
+# Dolibarr language file - en_US - install
+InstallEasy=We tried to make Dolibarr setup as easy as possible. Just follow instructions step by step.
+DolibarrWelcome=Welcome on Dolibarr
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index b1c4285b581..7f2776e88ec 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -1,5 +1,6 @@
# Dolibarr language file - fr_FR - admin
Version=Version
+DolibarrSetup=Installation Dolibarr
GlobalSetup=Général
GUISetup=Interface
DictionnarySetup=Dictionnaires
diff --git a/htdocs/langs/fr_FR/install.lang b/htdocs/langs/fr_FR/install.lang
new file mode 100644
index 00000000000..5aeef04760b
--- /dev/null
+++ b/htdocs/langs/fr_FR/install.lang
@@ -0,0 +1,3 @@
+# Dolibarr language file - fr_FR - install
+InstallEasy=Nous avons fait en sorte que l'installation soit le plus simple possible, vous n'avez qu'à suivre les étapes une à une.
+DolibarrWelcome=Bienvenu sur Dolibarr
\ No newline at end of file
diff --git a/htdocs/translate.class.php b/htdocs/translate.class.php
index 17c280a83f9..a5a6975a1e6 100644
--- a/htdocs/translate.class.php
+++ b/htdocs/translate.class.php
@@ -147,10 +147,10 @@ class Translate {
* \return array list of languages
*/
- function get_available_languages()
+ function get_available_languages($langdir=DOL_DOCUMENT_ROOT)
{
// On parcour le répertoire langs pour détecter les langues disponibles
- $handle=opendir(DOL_DOCUMENT_ROOT ."/langs");
+ $handle=opendir($langdir ."/langs");
$langs_available=array();
while ($file = trim(readdir($handle))){
if($file != "." && $file != ".." && $file != "CVS") {