Massimo, in this case it doesn't matter in which language my app is written. I'm talking about 'welcome' and 'admin' applications which comes with web2py. Current behavior is following: If I set only one language in web browser preferences everything goes ok. That means if I set 'es-es' I receive spanish messages, if I set 'pl' I receive polish messages. So far so good. But if I set two or more languages e.g. 'pl',it' so variable request.env.http_accept_language' have value: 'pl,it;q=0.5' then I receive messages not translated (in this case in english). Moreover, your suggestion:
T.current_language=['en'] T.force(request.env.http_accept_language) didn't work. However after playing with web2py's shell I noticed that this works as it should be: T.force(request.env.http_accept_language.split(',')) BTW I don't understand why I have to add this line: T.force(request.env.http_accept_language.split(',')) to every of my apps and to admin as well? Shouldn't web2py respect http_accept_language by default? regards, Lukasz On 28 Sty, 16:10, mdipierro <mdipie...@cs.depaul.edu> wrote: > In which language is your app written in (pl, en, it)? > Do you have a: > > T.current_language=['en'] > T.force(request.env.http_accept_language) > > in your code? We did change the behavior of languages at some point > from no default to default to english (we had a long discussions about > this here). This means if your app is not in english but you do not > explicitly declare the language, web2py thinks it is english and will > not translate it. > > Massimo > > On Jan 28, 4:14 am, ls1 <ls1.luk...@gmail.com> wrote: > > > Hello, > > > I recently upgraded web2py from 1.62.2 to 1.74.8 and have following > > problem. > > The applications (even 'welcome' which comes with web2py) are not > > translated according to web browser language preferences. > > > If I have set language preferences in web browser like: > > 'pl','en' -> I got all messages in english > > 'pl', 'it' -> I got all messages untranslated (in english) > > 'pl' only -> I got all messages correctly translated (in polish) > > 'it' only -> I got all messages correctly translated (in italian) > > > Variable 'request.env.http_accept_language' looks to be correct in > > each case. > > I tried solutions from web2py internationalization tutorial posted on > > vimeo, but it didn't work. > > > I test it with FF3.5 and IE8 and on different platforms: linux/apache > > and windows/built-in CherryPy. > > Same results. > > > any ideas? bug or feature? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@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.