Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 66680 invoked from network); 29 Jun 2007 17:04:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jun 2007 17:04:19 -0000 Received: (qmail 55117 invoked by uid 500); 29 Jun 2007 17:04:06 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 55101 invoked by uid 500); 29 Jun 2007 17:04:06 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 55072 invoked by uid 99); 29 Jun 2007 17:04:06 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jun 2007 10:04:06 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of cadiolis@gmail.com designates 64.233.162.230 as permitted sender) Received: from [64.233.162.230] (HELO nz-out-0506.google.com) (64.233.162.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jun 2007 10:04:01 -0700 Received: by nz-out-0506.google.com with SMTP id x3so495446nzd for ; Fri, 29 Jun 2007 10:03:40 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=CsMCGgKnOZlZoiQTq3Bs8QkSFesegYd5dtIEnDTTggaWPP9zLMzQ1s35QgOJ/kGG6Meu/4vSzDYq04jJ8fMEKCT1FnyZDt0JGSHvAeLZDvVmmx+cI28JMG3YMEkDteZ02Ri2pBEQ+PpfHgj0gEmsGL+dR7b3bEFMO7jDbQhjLBk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=bFNjKSb8Fu+QXFpUdQTpkG2zYbHlJVNkAbbyVAdAzIyezPSM1md8HAyho8JX/CCQTF4iPrywU2h5KzYCx42ltdkZzsUKpoLXwMhps73CaKTA3M5UpISGQUIYifnkK65veeQ3eke62GhXNqEAtEMsLym55Vzve1/LS9XADu6ukLA= Received: by 10.114.194.1 with SMTP id r1mr2787652waf.1183136619557; Fri, 29 Jun 2007 10:03:39 -0700 (PDT) Received: by 10.115.55.4 with HTTP; Fri, 29 Jun 2007 10:03:39 -0700 (PDT) Message-ID: Date: Fri, 29 Jun 2007 10:03:39 -0700 From: "Collin Peters" To: user-java@ibatis.apache.org Subject: I18N best practices with iBatis MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org 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? Regards, Collin Peters