Is internationalization support better in Velocity or FreeMarker?

Internationalization is important to us. Therefore, when choosing a template system for letters and other non-websites (we use spring webmvc / JSP for the Internet) that require templates, I need to know which descriptors translate phrases and formatting numbers, currency, dates, etc. I also read that StringTemplate focuses on internationalization and localization. But I have not heard anything about StringTemplate.

Is Velocity or FreeMarker Better? I know FreeMarker boasts of its internationalization capabilities, but is Velocity really just as good?

+3
source share
1 answer

Freemarker has more built-in support for the i18n core. However, Velocity with the addition of the VelocityTools project offers more i18n features, I believe. Spring also provides some i18n support that can be used in Velocity.

Personally, my preference for i18n over templating is to use VelocityTools support, but I am biased because I wrote most of this. In particular, I am fond of ResourceTool ($ text) and DateTool ($ date) for their power and flexibility.

I have never looked at the StringTemplate i18n capabilities, but they usually do very durable things, if a little more restrictive than I prefer. If they said that they are focused on i18n and much more, I would believe them.

+1
source

Source: https://habr.com/ru/post/1779567/


All Articles