Pawel J Maczewski wrote:
> I was thinking about methods of making translations of the site I'm working
> on to languages other then Polish. 'Cause our translators are familiar with
> gettext, I'd like to use it. But since gettext uses environment locale
> settings to detect what language to serve, how would it work while having
> long-running, mullti-thread application like Webware? Would I have to change
> the env variables every request? Or maybe there's some other, better then
> getext way to make Webware multilanguage apps?
I can't really tell you how it should work (except that changing the
environment definitely won't work). But it looks like this should work::
You'll make _ a method of the servlet, and do self._ =
gettext.Catalog(calculated domain) in your servlet's awake(). At least,
assuming self._() can be captured by tools the same way _() is.
If you get it working, please put a note about how you did it on the