diff --git a/core.php b/core.php index 89c207c28..6940b5330 100755 --- a/core.php +++ b/core.php @@ -164,7 +164,6 @@ $formatter = !empty($config['formatter']) ? $config['formatter'] : []; $translator = trans(); $translator->addLocalePath(base_dir().'/locale'); $translator->addLocalePath(base_dir().'/modules/*/locale'); -$translator->setLocale($lang, $formatter); // Individuazione di versione e revisione del progetto $version = Update::getVersion(); @@ -310,4 +309,5 @@ if (database()->tableExists('zz_settings') && database()->tableExists('zz_langs' Models\Locale::setDefault($id_lang); $lang = Models\Locale::find($id_lang)->language_code; + $translator->setLocale($lang, $formatter); } diff --git a/update/2_5.sql b/update/2_5.sql index b66a5890e..d5a5151af 100644 --- a/update/2_5.sql +++ b/update/2_5.sql @@ -2461,4 +2461,5 @@ ALTER TABLE `my_impianti_categorie` CHANGE `nota` `nota` VARCHAR(1000) NULL; ALTER TABLE `my_impianti_categorie` CHANGE `colore` `colore` VARCHAR(255) NULL; -- Esclusioni default in preventivi -INSERT INTO `zz_settings` (`id`, `nome`, `valore`, `tipo`, `editable`, `sezione`, `order`, `help`) VALUES (NULL, 'Esclusioni default preventivi', '', 'textarea', '1', 'Preventivi', NULL, NULL); \ No newline at end of file +INSERT INTO `zz_settings` (`id`, `nome`, `valore`, `tipo`, `editable`, `sezione`, `order`) VALUES (NULL, 'Esclusioni default preventivi', '', 'textarea', '1', 'Preventivi', NULL); +INSERT INTO `zz_settings_lang` (`id_record`, `id_lang`, `title`) VALUES ((SELECT `id` FROM `zz_settings` WHERE `nome` = 'Esclusioni default preventivi'), (SELECT `valore` FROM `zz_settings` WHERE `nome` = "Lingua"), 'Esclusioni default preventivi'); \ No newline at end of file