Database backed i18n for java web-app

后端 未结 4 1511
夕颜
夕颜 2020-12-03 09:05

I\'d like to use a database to store i18n key/value pairs so we can modify / reload the i18n data at runtime. Has anyone done this? Or does anyone have an idea of how to imp

4条回答
  •  执念已碎
    2020-12-03 09:39

    We have a database table with key/language/term where key is a n integer and is a combined primary key together with language.

    We are using Struts, so we ended up writing our own PropertyMessageResources implementation which allows us to do something like .

    It works very well and gives us the flexibility to do dynamically switch languages in the front-end as well as updating the translations on the fly.

提交回复
热议问题