File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1339,13 +1339,15 @@ static function registerOneType($itemtype) {
1339
1339
* @return nothing
1340
1340
*/
1341
1341
static function includeLocales ($ name ) {
1342
- global $ CFG_GLPI ;
1342
+ global $ CFG_GLPI , $ LANG ;
1343
1343
1344
1344
$ prefix = GENERICOBJECT_LOCALES_PATH . "/ $ name/ $ name " ;
1345
+ //Dirty hack because the plugin doesn't support gettext...
1346
+ $ language = str_replace ('.mo ' , '' , $ CFG_GLPI ["languages " ][$ _SESSION ["glpilanguage " ]][1 ]);
1345
1347
if (isset ($ _SESSION ["glpilanguage " ])
1346
- && file_exists ($ prefix . " . " . $ CFG_GLPI [ " languages " ][ $ _SESSION [ " glpilanguage " ]][ 1 ] )) {
1347
- include_once ($ prefix . " . " . $ CFG_GLPI [ " languages " ][ $ _SESSION [ " glpilanguage " ]][ 1 ] );
1348
-
1348
+ && file_exists (" $ prefix. $ language .php " )) {
1349
+ include_once (" $ prefix. $ language .php " );
1350
+
1349
1351
} else {
1350
1352
if (file_exists ($ prefix . ".en_GB.php " )) {
1351
1353
include_once ($ prefix . ".en_GB.php " );
@@ -1660,4 +1662,4 @@ static function uninstall() {
1660
1662
$ query = "DROP TABLE IF EXISTS `glpi_plugin_genericobject_types` " ;
1661
1663
$ DB ->query ($ query ) or die ($ DB ->error ());
1662
1664
}
1663
- }
1665
+ }
You can’t perform that action at this time.
0 commit comments