Correction du fichier hook.php pour le plugin SOC

This commit is contained in:
tips-of-mine
2025-05-31 14:43:12 +02:00
committed by GitHub
parent 5b30a110ac
commit 4622a1a2cd
6 changed files with 554 additions and 24 deletions

View File

@ -0,0 +1,17 @@
<?php
/**
* Initialize plugin translations
*
* @return void
*/
function plugin_init_soc_translations() {
global $CFG_GLPI;
$domain = 'soc';
$locale_dir = GLPI_ROOT . '/plugins/soc/locales/';
if (file_exists($locale_dir)) {
// Load plugin translations
$GLOBALS['LANG']->addTranslationFile('gettext', $locale_dir, $domain, $_SESSION['glpilanguage']);
}
}