[Koha-patches] [PATCH] Bug 7026 Web installer does not switch language

Frédéric Demians f.demians at tamil.fr
Mon Oct 17 08:05:39 CEST 2011


Language installer should switch to template files of language selected in
first step. It used to do that, but the feature seems to be broken now. Web
installer remains English after selecting a different language.

To reproduce:

- make sure your database is empty
- run 'perl translate install <some language>
- access web installer
- select language other then en on the first page

=> templates should change to translated templates
---
 installer/InstallAuth.pm |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/installer/InstallAuth.pm b/installer/InstallAuth.pm
index 3918698..2c07bbe 100644
--- a/installer/InstallAuth.pm
+++ b/installer/InstallAuth.pm
@@ -163,13 +163,7 @@ sub _get_template_language {
   my ($opaclang)= @_;
   return 'en' unless $opaclang;
   my $path= C4::Context->config('intrahtdocs')."/prog/$opaclang";
-  my $pref= ','.C4::Context->preference('language').',';
-  if(-d $path) {
-    if($pref =~ /,$opaclang,/ ) {
-      return $opaclang;
-    }
-  }
-  return 'en';
+  -d $path ? $opaclang : 'en';
 }
 
 =item checkauth
-- 
1.7.6.1



More information about the Koha-patches mailing list