Hi devnetters!
Not sure under what forum to put this, anyway...
Our users are asking for some sort of "phrase library" functionality, so that they can have fixed short phrases in a central location, to use in various texts.
Specifically, they are maintaining 3 websites, each in 20 locales, where several pages are saying things like "... present in
50 countries, with
150 offices ...". Every few months, these
numbers change a bit, and to have it correct, they have to change several pages per locale. The whole process of looking for what to update, and doing the "edit form + generate + validate + submit" is too unpleasant.
Right now, they've created a solution without involving us, developers, with an XML data island technique (
w3schools explanation). Unfortunately, (they didn't notice that) this only works in Internet Explorer.
So, now they're wondering if we have an alternative solution.
Looking at the benefits of the XML data island:
- central 'library' of phrases/words/numbers - easy to update
- run-time inclusion of library elements - global effect of central update
- no regenerates necessary (of the texts that use library elements)
- only 1 file to redeploy (the .xml data)
I can think of only a few approaches at the moment - none of which really has the same benefits:
(1) let them write "codes" like __NUMBER_OF_COUNTRIES__ in the DCR, and then we would parse the texts as part of the form generation and do a replace. But this would still require to regenerate all DCR involved (manually or somehow automated) + submits etc.
(2) same codes as in (1), but do a rewrite as a post-deploy task. Messy (changes the 'compare based' deploy dynamics) and risky (if the task doesn't complete).
(3) keep the xml data island, use more javascripting in the pages, to overcome the browser difference. Sorta 'AJAX' approach to updating text in the page. Messy (lotsa scripting for a text-based problem) and risky (if JS is disabled).
I'd love to hear your ideas...
Thanks for sharing,
Frederik.