I'm looking for a good general library to grab localized labels for displaying on a web page. I've found some useful solutions at Database backed i18n for java web-app and I will use them but I wanted to see if there was a standard library other than the fmt jstl tags that is already database backed.
Asked
Active
Viewed 414 times
3
-
1Why would you want to hit the database for this kind of thing? Just curious ... – Stephen C Apr 19 '10 at 03:18
-
2@Stephen C: There may be many reasons for that. First of all you may need the language pack to i18nalize message ids in SQL queryies (imagine i18nalized city names and queries like "where city is 'Moscow'" or "where city is 'Moskau'"). Next, you may want to provide a language pack editor interface. You may want to be able to extend internationalized enumerations and so on. There are lot of things which are much simpler with a database rather that with message bundle property resources. – lexicore Apr 19 '10 at 06:19
-
@Shaun F: This wouldn't qualify as an answer, but we use Spring MessageSources for this task. We've implemented a database-based message source and accompanying infrastructure (properties->database populator, resource bundle wrapper and so on). Was ca. one person-day of work. – lexicore Apr 19 '10 at 06:21
-
@lexicore - If you say so. My preference would be to use a resource bundle that I can put into version control along with the source code and site configurations. – Stephen C Apr 19 '10 at 07:18
-
1@Stephen C: We need the ability to manage localized labels per site. These labels can be updated and configured by the client. That's why the file based resource approach doesn't work for us. – Shaun Apr 19 '10 at 22:29
-
1Five years later...how about http://cloud.spring.io/spring-cloud-config/ – Neil McGuigan Sep 04 '15 at 21:05