ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Collin Peters" <cadio...@gmail.com>
Subject I18N best practices with iBatis
Date Fri, 29 Jun 2007 17:03:39 GMT
I have some I18N questions and am wondering what others do out there.

We have an I18N system setup where there is a database table storing
all strings and their translations.  There is tags against each i18n
string and then they will get written out different files (some
.properties for java, some .xml for flash/flex, some .php for php
etc...).  We also do some queries where we do a join against this
table to keep things simple at the database level.  How this looks is:

SELECT a.activity_id, i."en_US" as name
FROM  activities a
JOIN  i18n i ON (a.name_i18n_id = i.i18n_id)

This means that we have to pass in the locale (en_US) to the query.
In PHP, Perl, and straight Java this isn't a problem.  But how would
this easily be accomplished with iBatis?  Do I have to pass in the
locale as a parameter to *every* query that supports it?  Would there
be some way of making this automatic and transparent?

Collin Peters

View raw message