I think there will be a problem, in case I have a none standart
setting in my browser. If I don't have English defined in my browser,
only Italian, for example, it will throw an error, even if I wrote
T.current_languages=['en','en-en'], trying to read the accepted
language.

On May 11, 11:59 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> The following is not the appriate way of dealing with it:
>
> > if T.http_request_language != T.accepted_language:
> >     flash("Tell your admin to add language %s to this app!"
> > % T.http_request_language )
>
> > if T.accepted_language==None:
> >      # try to force some language;
> >      # if it's still 'None' then you have the above info, albeit in a longer
>
> because
> - T.http_request_language may actually multiple requested languages
> and only one of them may be accepted
> - the proper way to set a default is by
>
> T.current_languages=['en','en-en']
>
> This way you choose with languages do not need translations.
> I see what you are trying to do and I think this needs one more API. I
> will create it and post an example.
>
> Massimo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to