This is (was) a bug. It is now fixed in trunk. Thanks for reporting
it.

Massimo

On Nov 6, 2:50 pm, Benigno <[email protected]> wrote:
> Ok,
>
>    Problem still there without routes.py.
>
>    Removed routes.py, but left on db.py the following:
>
> # Rerouting of language
> if request.vars._language: T.force(request.vars._language)
>
>    I change en.py, but as soon as I go 
> tohttp://127.0.0.1:8000/AlbenDas/default/index?_language=es
>    the en.py file gets modified (default value containing the spanish
> T elements).
>
>    I am sending you the app by mail.
>
> On Nov 6, 6:18 pm, mdipierro <[email protected]> wrote:
>
> > Do you have the problem only when you use routes?
>
> > On Nov 6, 10:43 am, Benigno <[email protected]> wrote:
>
> > > Hello,
>
> > >     I have the following code in my index view:
>
> > > (exceprt from layout.html):
> > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//
> > > {{=request.vars._language.upper()}}" "http://www.w3.org/TR/xhtml1/DTD/
> > > xhtml1-transitional.dtd">
> > > {{T.current_languages=['es','es-es']}}
> > > <html xmlns="http://www.w3.org/1999/xhtml";
> > > xml:lang="{{=T.accepted_language or 'en'}}">
>
> > > And then in Index.html:
>
> > >       {{response.write(T('<div>
> > >         <p><span class="titulo_txt">AlbenDas</span>  tiene
> > > clientes ... </p>
> > >       </div>'),escape=False)}}
>
> > > I do this this way to translate blocks of text with different tags
> > > (bolds etc) as they differ a bit betweenlanguages.
>
> > > Also, I have this in routes.py:
> > > routes_in = (('/AlbenDas/static/(?P<any>.*)','/AlbenDas/static/$any'),
> > >              ('/AlbenDas/$language/(?P<any>.*)','/AlbenDas/default/
> > > $any?_language=$language'),
> > >              ('.*:/favicon.ico', '/examples/static/favicon.ico'),
> > >              ('.*:/robots.txt', '/examples/static/robots.txt'))
> > > routes_out=()
>
> > > Now, I do all the translation. I check 
> > > URL:http://127.0.0.1:8000/AlbenDas/en/index
> > > And it all appears in english nice and dandy.
> > > Next I 
> > > checkhttp://127.0.0.1:8000/AlbenDas/es/index (orhttp://127.0.0.1:8000/AlbenDas/default/index)
> > >  and I get the page in
> > > Spanish as it should.
>
> > > Now it comes the funny thing, I check again the English one, and its
> > > is in Spanish, and the real weird thing (to me at least) is that if I
> > > go to check translation file en.py the translated block is there, but
> > > with all the translated text back to Spanish.
>
> > > How is that translation file (en.py) being overwriten back to
> > > Spanish?.
>
> > > Thanks for your help,
> > > Benigno.
>
>
--~--~---------~--~----~------------~-------~--~----~
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