Sorry. My suggestion below was incorrect. Your code is different than my example and more appropriate for your purpose.
Massimo On Jan 3, 5:27 pm, mdipierro <[email protected]> wrote: > On Jan 3, 12:47 am, Jaroslaw Zabiello <[email protected]> wrote: > > > I do not like the way web2py distinguish 'en' and 'en-en' as two > > different languages, so I wrote a simple code which fix it. > > > lang = request.env.http_accept_language.split(',')[0].split(';') > > [0].split('-')[0] > > if lang not in [all_available_languages]: lang = DEFAULT_LANG > > T.force(lang) > > This is not necessary. Just do > > T.current_languages=[DEFAULT_LANG] > > > request.folder --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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 -~----------~----~----~----~------~----~------~--~---

