[eluser]Bramme[/eluser]
Thanks for the suggestion. I posted this question on Forrst too, somebody there gave me a good idea:"Put the strings in a JSON file? Readable by both JS and PHP." Which would actually work nice.
I use another way at the moment, that works pretty well for me too: I made a js controller that outputs a javascript/application header, in the controller methods I simply echo the javascript I need in json objects. This way, I created two objects: lang and config, which lets me use things like base_url() etc too.
If anyone's interested, I can post some more code.