I've tried to re-phrase my question in my head a million times, as there seem to be quite a number of approaches and solutions, but finally decided to ask it in a very general way:
What is the best way to localize variables in external javascript, such as help hints, tooltips, and such?
Currently I have my js pasted raw into PHP Code, in as many instances as there are languages on the site, and I'm switching the variable set based on:
<?php
global $language;
$lang = $language->language;
?>
but I strongly dislike having a gazillion of copies of same text throughout the site. This is good for testing, but for production I want just one javascript file which I could call with parameters, something like:
<script src="myscript.js?hl=<?php print $lang?>"><script>