That I have try to do is to have one js file to both Swedish and English.
In steel series gauges you have to chose to have one language / js file.
I want to use the variable that I all ready have in a php file an set that in the js file, but I have not been able to get it to work.
In the gauges.js it look like this from the beginning.
Code: Select all
var gauges = (function () {
var strings = LANG.SE, //Set to your default language. Store all the strings in one object
First I change value to the right format
Code: Select all
if ($lang=="sv")
{
$ss_lang="LANG.SE";
}
else
{
$ss_lang="LANG.EN";
}
Code: Select all
<script>var ss_lang = '<?php echo $ss_lang; ?>';</script>
<script src="lib/steelseries/gauges.js"></script>
I guess I need to change this
Code: Select all
var strings = LANG.SE
Maybe someone here now the right solution and can give me some help.
(I have no example up and running at my web page yet, it in experimental stage and runs on a local computer)
/Kenneth