HTTP_ACCEPT_LANGUAGE
Here's a list of environment variables I get with a simple shell script:
DOCUMENT_ROOT
GATEWAY_INTERFACE
HTTP_ACCEPT
HTTP_ACCEPT_ENCODING
HTTP_ACCEPT_LANGUAGE
HTTP_CONNECTION
HTTP_HOST
HTTP_USER_AGENT
PATH
QUERY_STRING
REMOTE_ADDR
REMOTE_PORT
REQUEST_METHOD
REQUEST_URI
SCRIPT_FILENAME
SCRIPT_NAME
SCRIPT_URI
SCRIPT_URL
SERVER_ADDR
SERVER_ADMIN
SERVER_NAME
SERVER_PORT
SERVER_PROTOCOL
SERVER_SIGNATURE
SERVER_SOFTWARE
UNIQUE_ID
The script:
#!/bin/sh
echo "Content-Type: Text/plain"
echo
/usr/bin/env
If you want to get really fancy, you could even check something like
$DOCUMENT_ROOT/qmailadmin/ for templates.
In my application, I don't imagine that my document root is going to be
different for any domains. This would definately make configuration much
easier. Apache is on my mail server solely for the purpose of sqwebmail and
qmailadmin.
For authentication (from the other thread), it would probably also be
possible to use the HTTP_HOST variable for the domain, then send out proper
headers to request authentication:
WWW-Authenticate: Basic realm="My Realm"
HTTP/1.0 401 Unauthorized
The above will cause the browser to pop up a login window, as opposed to
doing it with forms.
Anyways, I've babbled enough, and have probably given you enough ideas for
one morning :)
--
Troy Settle
Pulaski Networks
540.994.4254
It's always a long day, 86400 doesn't fit into a short
> -----Original Message-----
> From: kbo [mailto:kbo]On Behalf Of Ken Jones
> Sent: Wednesday, October 18, 2000 12:05 PM
> To: [EMAIL PROTECTED]
> Subject: language environment variable?
>
>
> Hi,
>
> I'm working on redoing the qmailadmin code to support multiple
> languages. Instead of doing some wierd tricky code, I figured
> we can use the built in language environment variable from
> the web server.
>
> Does anyone know the name of the environment variable that
> carries the language?
>
> I'm removing all the hard coded english text from qmailadmin
> and putting it in a file. So no "text" is compiled in.
>
> Then we can do translation of the html templates and this
> one file into different languages.
> So when people connect to qmailadmin, it can automatically
> display it in the proper language based on what the user
> has set as thier language in the browser.
>
> Ken Jones
>
>