[stringtemplate-interest] Dynamic attribute reference?

Mark Cooke markcooke666 at yahoo.co.uk
Wed Nov 8 09:23:24 PST 2006


Hi,
I've not found a way to get this to work...

I have a "model" in a code generator which is
basically a database table of strings (ID, lang1Text,
..., langNText) which I want to generate separate java
.properties files from.

What I ideally want to do is have a template which can
be used for every language, and just repeatedly apply
it, changing the language each time.
I can't seem to find a way of doing this with
stringTemplate.
(I Think I'm basically asking - can I doubly nest
attribute references for property refs - i.e.
String.<<language>Text> where if language was
"English" String.getEnglishText() would be called?

Note: I'm looking at different "engines" comparing
usability, ease of writing, running templates for
re-writing a code generator which uses horrible string
concatenation...
...So please don't respond with RTFM!

TIA,
  Mark.

Send instant messages to your online friends http://uk.messenger.yahoo.com 


More information about the stringtemplate-interest mailing list