Just tested locally on an older version - happens too and independently of browser settings. No idea why I could not reproduce it earlier for 'it' and 'fr'.
web2py Shell Version 1.65.7 (2009-07-28 18:50:03) In[0]: T('Hello World').xml() Out[0]: 'Hello World' In[1]: T.force('it') Out[1]: ['it'] In[2]: T('Hello World').xml() Out[2]: 'Salve Mondo' In[3]: T.force('en') Out[3]: ['en'] In[4]: T('Hello World').xml() Out[4]: 'Hello World' In[5]: T.force('it') Out[5]: ['it'] In[6]: T('Hello World').xml() Out[6]: 'Hello World' An below's what's left in it.py { 'Hello World': 'Hello World', } HC On 15 Aug., 19:05, mdipierro <mdipie...@cs.depaul.edu> wrote: > which web2py version (date)? > > On Aug 15, 8:12 am, hcvst <hcv...@googlemail.com> wrote: > > > Ok, there's also a mistake in my db.py it should say > > > if session.lang: > > T.force(session.lang) > > > Nonetheless, loosing the translation is strange. T.force(None) > > only switches translation off, doesn't it? > > > On 15 Ago, 15:05, hcvst <hcv...@googlemail.com> wrote: > > > > 1.65.11 > > > > Hi, > > > > I've just translated the better part of my site into German and added > > > the following lines to db.py > > > > lang = request.vars.get('lang', None) > > > if lang: > > > session.lang = lang > > > if session.lang: > > > T.force(lang) > > > > I am not sure what happend but after adding the querystring ?lang=de > > > my entire de.py file was truncated. > > > > Initially I could only reproduce this error for 'de' and not for 'it' > > > or 'fr' for example. > > > Then I set my browser's default lang to 'it', called ?lang=it and > > > Italian too was no more. > > > > I'd look at the source now, but I need to get translating again. > > > BTW, should I submit a default de.py and de-de.py to include with w2p? > > > > HC --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---