Storing a Map<Locale,String> using JPA

Viewed 1395

What's the simplest way to store a Map<Locale,String> attribute using JPA annotations? The application that I'm working on needs to store multilingual text – that is (essentially) the same text but written in multiple languages.

Note that a good number of entities require this kind of attribute (and multiple of such attributes per entity). Therefore the solution needs to be easily replicable and not copy-pasting gobs and gobs of code to each entity.

To illustrate, the application will need to store data for these things: enter image description here

(notice that the same item is written in five languages)

1 Answers
Related