Re: [web2py] simpler then request.env.http_accept_language

2012-07-19 Thread Richard Vézina
from ordereddict import OrderedDict things_list=db().select(db.ref_thing.id, db.ref_thing.thing) things = [] if T.accepted_language.split('-')[0] == 'en': for r in things_list: things.append((en_ui_tables_names[r.thing],r.id, r.thing)) things.sort(key=lambda x: x[0].lower()) el

Re: [web2py] simpler then request.env.http_accept_language

2012-07-19 Thread Richard Vézina
Is T.accepted_language could be empty? Richard On Thu, Jul 19, 2012 at 4:08 PM, Richard Vézina wrote: > I read about it, but I wasn't sure if it contain the first prefered > language set in the browser of visitor... > > But I think, it's what I was searching for. > > Thanks Bruno! > > Richard >

Re: [web2py] simpler then request.env.http_accept_language

2012-07-19 Thread Richard Vézina
I read about it, but I wasn't sure if it contain the first prefered language set in the browser of visitor... But I think, it's what I was searching for. Thanks Bruno! Richard On Thu, Jul 19, 2012 at 3:17 PM, Bruno Rocha wrote: > *T.accepted_languag*e does not helps? > > On Thu, Jul 19, 2012

Re: [web2py] simpler then request.env.http_accept_language

2012-07-19 Thread Bruno Rocha
*T.accepted_languag*e does not helps? On Thu, Jul 19, 2012 at 3:59 PM, Richard Vézina wrote: > Hello, > > I need to render a form with ordered input label in alphabetic order base > on the browser language, so I thought that that I could get the user setted > browser languages from request.env.h

[web2py] simpler then request.env.http_accept_language

2012-07-19 Thread Richard Vézina
Hello, I need to render a form with ordered input label in alphabetic order base on the browser language, so I thought that that I could get the user setted browser languages from request.env.http_accept_language in order to determine which sorted label to return, but request.env.http_accept_langu