Today I will show you 3 options to map localized data and discuss the pros and cons of each of them.
The first one is the easiest approach and a great fit for static data. But if you need to be able to edit or add new translations, I recommend using the 3rd one. We've used that one in several client projects, and it works really well after you got used to the additional complexity.
But before we start, if this is your first time here, and you want to learn how to create your entity mappings with ease, build incredible efficient persistence layers with Hibernate and all types of other Java persistence related stuff, start now by subscribing and clicking the bell, so you don't miss anything.
Internationalization not only affects the UI. If your application stores user-generated data and supports multiple languages, you also need a way to store different translations in your database. Typical examples are:
• market places that allow you to provide product descriptions in various languages,
• travel sites that offer trips to people all over the world and
• document management systems that store document descriptions and keywords for multiple languages.
In all of these examples, you need to localize your frontend and parts of the persisted data. The two most common approaches for that are:
• Using Java’s ResourceBundles and
• Storing the translations in the database.
Links:
How to Design a Localization-Ready System : https://www.vertabelo.com/blog/techni...
Localized Data – How to Map It With Hibernate: https://thoughts-on-java.org/jpa-gene...
If you like this video, please give me your thumbs up and share it with your friends and co-workers.
Like my channel? Subscribe!
➜ http://bit.ly/2cUsid8
Join the free Member Library:
https://goo.gl/dtyIIC
Read the accompanying post: https://thoughts-on-java.org/localize...
Want to connect with me?
Blog: http://www.thoughts-on-java.org/
Twitter: / thjanssen123
Facebook: / thoughtsonjava
Linkedin: / thorbenjanssen
#localization #hibernate #mapping