From 1be3b31c10a03292b3c62856d7a37c45764609c9 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 27 Nov 2013 18:17:24 +0100 Subject: [PATCH] generate_lang_file.php : Permit multiple source files inclusion --- public_html/lang/generate_lang_file.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public_html/lang/generate_lang_file.php b/public_html/lang/generate_lang_file.php index 786b88cd..27cb02b1 100755 --- a/public_html/lang/generate_lang_file.php +++ b/public_html/lang/generate_lang_file.php @@ -29,10 +29,14 @@ require_once('../conf/config.inc.php'); $withoutselectlist=False; $copyoriginalvalue=False; $additionalfileformat=False; +$translations=array(); if ($argc > 1) { for ($i=1;$i<$argc;$i++) { if (is_file($argv[$i])) { @include($argv[$i]); + foreach($GLOBALS['LSlang'] as $msg => $trans) { + $translations[$msg]=$trans; + } } elseif($argv[$i]=='--without-select-list') { $withoutselectlist=True; @@ -57,8 +61,8 @@ $data=array(); function add($msg) { if ($msg!='') { - global $data; - $data[$msg]=$GLOBALS['LSlang'][$msg]; + global $data, $translations; + $data[$msg]=$translations[$msg]; } }