On 5 Jan 2014, at 8:44 AM, Rockiger <rocki...@googlemail.com> wrote: > Hello together, > > I have a problem with routes.py. My goal is it to have a English and a German > (de) version of my site: > > I have the following code in there: > > routers = dict( > # base router > BASE = dict( > default_application = 'rockiger', > ), > rockiger = dict( > default_language = 'de', > languages = ['en', 'de'], > map_static = True, > ), > ) > > According to the web2py cookbook there should be now a request.lang > variable, but I can't it. Has anybody a idea what the problem could be? >
There may be a bug, or there may be a documentation problem. The example file claims that it's being set in request.language, not request.lang, but as I look at it, I don't see where, and there's no unit test for it. Would you please dump your entire request object and see if the language shows up anywhere (aside from I guess the original URL)? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.