[Twisted-web] support for other languages in newov

Mike Mueller twisted-web@twistedmatrix.com
Fri, 16 Jan 2004 04:23:57 +0100


>>Mike : After looking at it, the problem is that gettext assumes that 
>>there is a global language that is valid for the the whole application at 
>>any given point in time.
>>I would like to have two (or more) languages at the same time. Depending 
>>on the preferred language of the current visitor, each session has "its" 
>>language.
>
>Christopher (radix): You sure about that? I'm certain I remember a 
>conversation where someone else said the same thing, but was successfully 
>told otherwise (with an explanation). I don't remember the details, but 
>maybe someone else does (or you'll notice them if you look deeper ;)


Do you mean gettext is not global for whole application or it is not 
possible to store the language in a session?
I guess the latter. This boils down to problems with unique session data.
In the December archive of twisted-web I found
<http://www.twistedmatrix.com/pipermail/twisted-web/2003-December/000045.html>http://www.twistedmatrix.com/pipermail/twisted-web/2003-December/000045.html
which a essentially says, as long as session data are always retrieved from 
request and ./twistd -oy script.tac is used it should work. I hope this 
applies to newov. Getting session straight is very important if people need 
to have different views on a page. This is a rather common scenario for 
dynamic pages, I think.


Mike