This patch adds a custom ResourceTool subclass to the Velocity context. A custom subclass is needed in order to wire in SolrResourceLoader's ClassLoader facility.
After applying this patch, a path needs to be added to SolrResourceLoader via solrconfig.xml, like this:
Then in conf/velocity, add a resources_en_US.properties file (or whatever your system default locale is) in the conf/velocity directory, something like this:
Then in a Velocity template, use:
See http://velocity.apache.org/tools/releases/2.0/javadoc/org/apache/velocity/tools/generic/ResourceTool.html for more details on how to use Velocity's ResourceTool.
NOTE This patch currently only works with the default system locale. There's surely some way to allow configurability of the Locale, though nothing totally trivial jumped out at me on how to do it.