[Nitro] "babel": new translation system - suggestions&help wanted
news at stephan.walter.name
Sun Apr 2 08:40:12 EDT 2006
On Sat, 01 Apr 2006 23:58:11 -0800, Bryan Soto wrote:
> On 4/1/06, Stephan Walter <news at stephan.walter.name> wrote:
>> 2. as I am automagically translating the fields into the selected
>> language, this interferes with the admin interface (i.e. the admin
>> interface doesn't show the actual contents of the database, but the
>> translations in the base language). Is there a simple way to distinguish
>> if the admin interface or the normal web app is accessing the data?
> In the model you mean? Not really I think. Other than going through the
> call stack.
> Perhaps a new setting like 'raw' could be made that didn't do any
> translation? Then you could do something like
> class AdminController # The controller mounted by part/admin on /admin
Uh sorry, I was confused. Of course the contents of the model is per
definition in the base language. The problem is that Locale.set is global
for the application, and setting a language in the AdminController only
works until somewhere else you define a different Locale. From then on all
the content will be in that language, which was my goal, but that isn't
what I want for the admin interface.
More information about the Nitro-general