mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-05 08:14:00 +01:00
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:
15
index.php
15
index.php
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user