Bug 24973: Load custom localization file
[koha-equinox.git] / installer / install.pl
index 0414381..350562d 100755 (executable)
@@ -245,9 +245,12 @@ elsif ( $step && $step == 3 ) {
     elsif ( $op && $op eq 'addframeworks' ) {
 
         # 1ST install, 3rd sub-step : insert the SQL files the user has selected
+        my $langchoice = $query->param('fwklanguage');
+        $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
+        $langchoice =~ s/[^a-zA-Z_-]*//g;
 
         my ( $fwk_language, $list ) =
-          $installer->load_sql_in_order( $all_languages,
+          $installer->load_sql_in_order( $langchoice, $all_languages,
             $query->multi_param('framework') );
         $template->param(
             "fwklanguage" => $fwk_language,