Sorry my Gods, but....
I have php, file, and in this php i set the language, and include the necessary lang file:
...
if ($lan=='ge') {$_SESSION['lang']='german';...}
if ($lan=='en') {$_SESSION['lang']='english'; ....}
}
if ($_SESSION['lang']=='english'){
include ..english
}else{
include ...german
}
I use Yshout in my site, and want to make it multilang. In the JS file the developer use some text which i have to make it multilanguage.
So in JS file the first line:
`<?php header('Content-type: text/javascript');?>
And in the php:
<script src="/js/yshout.php" type="text/javascript"></script>
Now i can use PHP in JS file. So i try to use instead of the fix text. But no results, 'coz JS don know $text variable. If i include the language file in the JS then OK, but i have to include the necessery language file, this is not work, 'coz JS dont know the $_SESSION['lang'] varible when he run.
Which is the simplest way to tell JS which language file have to be included and how can i do that?
Thank you