Thank you, Álvaro. The problem is still there, I tried with the latest
(revision 854) version ...

Could it be wrong usage of T operator in the model?


On Apr 28, 12:57 am, Álvaro Justen [Turicas] <[email protected]>
wrote:
> On Mon, Apr 27, 2009 at 3:40 PM, Vidul Petrov <[email protected]> wrote:
>
> > Just tried revision 854 of languages.py, probably a wrong usage in my
> > model:
>
> Please download all web2py 854 revision to test. Other files were modified.
>
>
>
>
>
> > T.current_languages=['en', 'en-en']
>
> > try:
> >    T.force(session.language or 'en-en')
> > except:
> >    T.force('en')
>
> > and in the controller:
>
> > lang_struct = {'BG':'bg-bg','RU':'ru-ru','EN':'en-en'}
>
> > def change_language():
> >    lang = request.vars.language
> >    function = request.vars.function
> >    if lang_struct.has_key(lang):
> >        session.language = lang_struct[lang]
> >        T.force(session.language) # I am in doubt about the proper
> > usage here
> >    return redirect(URL(r=request,c=request.controller,f=function))
>
> > ?
>
> > Thank you.
>
> > On Apr 27, 9:25 pm, mdipierro <[email protected]> wrote:
> >> We changed things in languages.py since. Can you try the trunk?
>
> >> Massimo
>
> >> On Apr 27, 1:23 pm, Vidul Petrov <[email protected]> wrote:
>
> >> > The strings are in the language file, but they are not being
> >> > translated if they come from models.
>
> >> > On Apr 27, 9:20 pm, Vidul Petrov <[email protected]> wrote:
>
> >> > > Version 1.59 (2009-03-16 13:10:16) with slight modifications in
> >> > > "tools.py".
>
> >> > > On Apr 27, 9:16 pm, mdipierro <[email protected]> wrote:
>
> >> > > > which version (date)?
>
> >> > > > On Apr 27, 11:57 am, Vidul Petrov <[email protected]> wrote:
>
> >> > > > > Hi,
>
> >> > > > > The translation seems not to work in models:
>
> >> > > > > db.contact.sender_name.requires = [IS_LENGTH(1,error_message=T('the
> >> > > > > name is too long'))]
>
> >> > > > > Anybody had a similar problem?
>
> --
>  Á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
-~----------~----~----~----~------~----~------~--~---

Reply via email to