Press "Enter" to skip to content

HardLikeSoftware Posts

Thoughts on StringTemplate part 1

I have been working with StringTemplate for a few months now. I know that isn’t too long and others have been using it for much longer. But in that time I have thought a lot about it and formed some opinions. (I hope it is clear from what I have already written that I’m a big fan.) In this and the next few articles I’ll try to organize my thoughts, hopefully stir up some discussion and possibly impact future versions of the language.

1 Comment

I18n With StringTemplate

Developers accustomed to internationalizing Java [web] applications are very familiar with ResourceBundle, MessageFormat and property files. The articles Localization and Internationalization with StringTemplate and Web Application Internationalization and Localization in Action give a good introduction to how StringTemplate can be used to do i18n but they don’t explain how to get the full set of benefits we derive from ResourceBundle, and MessageFormat. In this article I describe how StringTemplate can leverage ResourceBundle and remove the need for MessageFormat in the presentation layer.

1 Comment