without lazyT then in
print T("a")
T.force("it")
print T("b")
"a" will be translated according to the accept-language
"b" will be translated in Italian
Because models are executed in alphabetic order (and before
controllers) and may have T in labels and validators, one may run into
trouble (force cannot be called in controllers and arbitrary models).
Massimo
On 26 Apr, 18:00, Álvaro Justen [Turicas] <[email protected]>
wrote:
> On Sun, Apr 26, 2009 at 7:54 PM, mdipierro <[email protected]> wrote:
> > The change would speed up translation a bit and make the syntax
> > cleaner but it would prevent users from setting the current language
> > after T is used the first time. This would be a soft break of backward
> > compatibility since I do not believe anybody is relying on lazyT.
>
> Well, users can use T.force() even if used T('bla bla') before, can't they?
>
> --
> Álvaro Justen
> Peta5 - Telecomunicações e Software Livre
> 21 3021-6001 / 9898-0141
> http://www.peta5.com.br/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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
-~----------~----~----~----~------~----~------~--~---