Get the ice-coder lang array into a JS array

So the /lib/ice-coder.js file can make use of it
This commit is contained in:
Matt Pass
2014-08-21 14:24:30 +01:00
parent 115169b16b
commit f5d19d99d4

View File

@@ -53,6 +53,21 @@ window.onbeforeunload = function() {
}
}
}
t = {
<?php
// Load the lang array for what's in the JS file
$t = $text['ice-coder'];
$tOutput = "";
foreach ($t as $key => $value) {
$tOutput .= '"'.$key.'" : "'.$value.'",'.PHP_EOL;
}
echo rtrim($tOutput,",".PHP_EOL).PHP_EOL;
// Back to the lang array for index
$t = $text['index'];
?>
}
</script>
<script language="JavaScript" src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';};?>.js"></script>
<script src="lib/mmd.js"></script>