I'm having a problem utilizing my language files.
Currently, I have a language file where I have an object like
var strings {
title: "Title",
subtitle: "Subtitle"
};
In my html currently, I'll have something like
<div id="title">Title</div>
<div id="subtitle">Subtitle</div>
Now I want to include inside the div the value from a javascript object instead, so that I can use various language files. The relevant language file is chosen in the backend by a php script, and isn't the issue here.
Eg
<div id="title">strings.title</div>
<div id="subtitle">strings.subtitle</div>
Is there an easy way to do this? I don't want to have to use php to create the necessary js file every single time, or use a jquery loop that populates every single div value on create, though right now it looks like that's what I'll have to do.'
Thanks