sub load_sql_in_order {
my $self = shift;
+ my $langchoice = shift;
my $all_languages = shift;
my @sql_list = @_;
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_offset_types.sql";
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_credit_types.sql";
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_debit_types.sql";
+ my $localization_file = C4::Context->config('intranetdir') .
+ "/installer/data/$self->{dbms}/localization/$langchoice/custom.sql";
+ if ( $langchoice ne 'en' and -f $localization_file ) {
+ push @fnames, $localization_file;
+ }
foreach my $file (@fnames) {
# warn $file;
undef $/;
my $error = $self->load_sql($file);
my @file = split qr(\/|\\), $file;
$lang = $file[ scalar(@file) - 3 ] unless ($lang);
- my $level = $file[ scalar(@file) - 2 ];
+ my $level = ( $file =~ /(localization)/ ) ? $1 : $file[ scalar(@file) - 2 ];
unless ($error) {
$systempreference .= "$file[scalar(@file)-1]|"
unless ( index( $systempreference, $file[ scalar(@file) - 1 ] ) >= 0 );
UPDATE systempreferences SET value = 'Willkommen im Koha-Katalog!' WHERE variable = 'OpacMainUserBlock';
UPDATE systempreferences SET value = '' WHERE variable = 'OpacNav';
UPDATE systempreferences SET value = '' WHERE variable = 'OpacNavBottom';
-UPDATE systempreferences SET value =
+UPDATE systempreferences SET value =
'<li><a href="https://worldcat.org/search?q={TITLE}" target="_blank">Andere Bibliotheken (WorldCat)</a></li>
<li><a href="https://scholar.google.com/scholar?q={TITLE}" target="_blank">Google Scholar</a></li>
<li><a href="https://www.bookfinder.com/search/?author={AUTHOR}&title={TITLE}&st=xl&ac=qr" target="_blank">Online-Buchhandel (Bookfinder.com)</a></li>'
--- /dev/null
+--
+-- System preferences that differ from the global defaults
+--
+-- This file is part of Koha.
+--
+-- Koha is free software; you can redistribute it and/or modify it
+-- under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- Koha is distributed in the hope that it will be useful, but
+-- WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with Koha; if not, see <http://www.gnu.org/licenses>.
+
+UPDATE systempreferences SET value = 'padre|madre' WHERE variable = 'borrowerRelationship';
+UPDATE systempreferences SET value = 'Sr.|Sra.' WHERE variable = 'BorrowersTitles';
+UPDATE systempreferences SET value = 'FR' WHERE variable = 'CurencyFormat';
+UPDATE systempreferences SET value = 'US' WHERE variable = 'AddressFormat';
+UPDATE systempreferences SET value = 'metric' WHERE variable = 'dateformat';
+UPDATE systempreferences SET value = 'ddc' WHERE variable = 'DefaultClassificationSource';
+UPDATE systempreferences SET value = 'Bienvenido al catálogo!' WHERE variable = 'OpacMainUserBlock';
+UPDATE systempreferences SET value = '' WHERE variable = 'OpacNav';
+UPDATE systempreferences SET value = '' WHERE variable = 'OpacNavBottom';
+UPDATE systempreferences SET value = '1' WHERE variable = 'CalendarFirstDayOfWeek';
+UPDATE systempreferences SET value = '1' WHERE variable = 'opaclanguagesdisplay';
UPDATE systempreferences SET value = 'URLLinkText' WHERE variable = 'URLLinkText';
UPDATE systempreferences SET value = '#200|<span style=\"font-weight:bold\">|{200a}{. 200c}{ : 200e}{200d}{ / 200f}{ ; 200g}{. 200h}{. 200i}|</span>\r\n#210|. – |{210a}{ : 210c}{, 210d}|\r\n#215|. – |{215a}{ ; 215d}|\r\n#225|. – |{(225a}{ ; 225v)}|\r\n#010|. – |{ISBN 010a}|' WHERE variable = 'ISBD';
-
--- /dev/null
+Standard systempreferanser.
+++ /dev/null
-Standard systempreferanser.
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,
<h3>Optional data added</h3>
[% ELSIF lis.level == 'mysql' %]
<h3>MySQL data added</h3>
+ [% ELSIF lis.level == 'localization' %]
+ <h3>Localization data added</h3>
[% ELSE %]
<h3>[% lis.level FILTER ucfirst | html %] data added</h3>
[% END %]