2009/12/15 Yarko Tymciurak <[email protected]>:
>
> On Dec 15, 11:23 am, Andrea Cappelli <[email protected]> wrote:
>> Il giorno mar, 15/12/2009 alle 07.37 -0800, mdipierro ha scritto:
>>
>> > We had a long discussion about this. We had a minor change of behavior
>> > that basically assumes the default language is English. We did not
>> > make such assumptions before. I opposed such change but apparently I
>> > was the only one and everybody else spoke for it. Now you have to be
>> > explicit about the fact that your language is Italian (somewhere
>> > before you use T):
>
>
> The solution was to be sure web2py had SOME DEFAULT definition for
> what the language of the strings within applications is (so that the
> correct translation texts would be selected).

Ok, this is clear

> You do not need to do this in every controller (although you _can_,
> unless you have a language course as the application, you probably do
> not _want_ to!)

The only problem is that setting T.current_language seems not work for
me, I need to call T.force(lang), where lang is recovered from request
and I don't know if request is available in models but I think it
doesn't


> This is a unfortunate naming of this variable - it is confusing...
> I should have named it T.app_language

OK

> In any case, you should - in model/db.py - simply declare what the
> default language of the source of the application is.

Ok, this is the right way

> I hope this helps.

Sure, I'll let you all know and I hope to share the script

Thanks

Bests,
Andrea

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to