I use server based sorting(in the db) using orderby clause. But now that I want to support multiple locales, how should I pass the locale information to the DB via hibernate layer. I have pre-defined views to which I add criteria and order in the hibernate layer.
+1
A:
But now that I want to support multiple locales, how should I pass the locale information to the DB via hibernate layer.
Honestly, I'm not sure I understood exactly what you want to do but if you want to order by something in a query, that something should obviously be present at the database level. Maybe you could elaborate a bit or illustrate what you want to achieve with an example?
Just in case, here are some resources that might give some inspiration:
- How to use a Collection of Elements to map a
Map
of[language_code]->[description]
- How to map Internationalized data in Hibernate using a
UserType
- Implementing I18N relationships with JPA
Pascal Thivent
2010-10-21 17:37:53