update(Calendar Locale): updates the locale used by the english language to en-GB instead of en-US

This commit is contained in:
SimonGschnell
2025-01-27 13:24:47 +01:00
parent 8afc2ab433
commit e53dae24e6
3 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod)
$ci->load->model('system/Sprache_model','SpracheModel');
$server_language = getData($ci->SpracheModel->loadWhere(['content' => true]));
$server_language = array_map(function($language){
return ['sprache'=>$language->sprache, 'locale'=>$language->locale, 'bezeichnung'=>$language->bezeichnung[$language->index-1]];
return ['sprache'=>$language->sprache, 'LC_Time'=>$language->locale, 'bezeichnung'=>$language->bezeichnung[$language->index-1]];
}, $server_language);
$user_language = getUserLanguage();
+1
View File
@@ -67,6 +67,7 @@ require_once('dbupdate_3.4/25999_C4_permission.php');
require_once('dbupdate_3.4/33683_digitale_anwesenheitsliste_und_entschuldigungsmanagement_fuer_studierende_prototyp.php');
require_once('dbupdate_3.4/40717_lv_faktor.php');
require_once('dbupdate_3.4/48526_pep_tagging.php');
require_once('dbupdate_3.4/25999_locale_update.php');
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
@@ -0,0 +1,16 @@
<?php
if (!$result = @$db->db_query("SELECT LC_Time FROM public.tbl_sprache WHERE LIMIT 1")) {
$qry = "
ALTER TABLE public.tbl_sprache ADD LC_Time VARCHAR(255) ;
UPDATE public.tbl_sprache SET LC_Time = 'en-GB' where locale ='en-US';
UPDATE public.tbl_sprache SET LC_Time = 'de-AT' where locale ='de-AT';
";
if (!$db->db_query($qry))
echo '<strong>public.tbl_sprache: ' . $db->db_last_error() . '</strong><br>';
else
echo '<br>public.tbl_sprache: column LC_Time was successfully added';
}