Ok, let me tell you all you need to know and consider again. I'm very accurate. Don't assume things that I'm not telling you, please. The following files and directories are relevant: ../ ./ ./lang ../es ../de ../ga ./ is the current directory and also the location of gulpfile.js ./ also contains several .php files. One of them is called index.php and it includes the others with 'require' statements. index.php contains the php statement: $curLang="en"; ./lang contains the files lang_strs_ga.json, lang_strs_de.json, lang_strs_en.json and lang_strs_es.json. Let's call the last two letters of each filename $lang. $lang can be 'en', 'es', 'ga' or 'de'. My binary php compiler resides at C:/Program Files/php/php.exe This is all you need to know about the setup. Now, what actions the gulpfile.js should define: We want to watch for changes on ./*.php and ./lang/lang_strs_*.json If a change of a file ./lang/lang_strs_*.json is detected { if the $lang of the filename is 'en' then { convert ./index.php to html using php2html. Then minimize it using minimizeHtml. Then save the resulting index.html to the parent directory ../ } else { in the .src stream of index.php, replace the string $curLang="en" with $curLang="$lang"; Proceed with convert to html and minimizing. Save the resulting html file not to ../index.html, but to ../$lang/index.html } } if a change of a file ./*.php is detected, act as though each of the four json file had been changed.