-var ix_template = new Template(__script_path__ + '/templates/index.html');
-Gio.simple_write(outputdir + '/index.html', ix_template.process(ns_idx));
-File.silentRecursiveCopy(__script_path__ + '/templates/resources/', outputdir, Gio.FileCopyFlags.OVERWRITE);
+// set up index and resources.
+langs.forEach(function(lang) {
+ var ix_template = new Template({
+ templateFile : __script_path__ + '/templates/' + lang.name + '/index.html',
+ Link : Link, // lang specifc?
+ });
+ Gio.simple_write(outputdir + '/' + lang.name + '/index.html', ix_template.process(ns_idx));
+ File.silentRecursiveCopy(__script_path__ + '/templates/resources/',
+ outputdir + '/' + lang.name , Gio.FileCopyFlags.OVERWRITE);
+});
\ No newline at end of file