Hi all,
I'm in the process of changing some krpano code so that it will support more than one language.
My plan is to store the translations in data fields, which I think will keep the code as simple as possible.
My plan is just to have PHP write out the data elements in the users language selection.
The problem I'm having is that some fields that show certain information, for example one that shows the user the date and time of when the panorama was taken, I currently have something like "Taken: <timetaken>'. The actual taken time is read from the database and placed into the XML using PHP.
I can't quite figure out how my code should look...
<layer name="mylayername" style="somestyle" align="center" y="0" zorder="1" html="data:mylayerdata"/>
Works for others that don't have the requirement for the extra information.
I tried things like
<layer name="mylayername" style="somestyle" align="center" y="0" zorder="1" html="data:mylayerdata some other text"/>
<layer name="mylayername" style="somestyle" align="center" y="0" zorder="1" html="get(data[mylayerdata].content) some other text"/>
Is there a way to do what I want in the layer clause? Or do I need to set the text from perhaps a startup action?
I'd like to do it using the data method in krpano, but the only other way I can think of is just to let PHP handle the translations in the preprocessing stage, though I don't think the resulting code would be quite as clean.
Any help anyone can offer would be greatly appreciated.
Thanks
David