Re: localisation in web applications
| From: | Tim Zickus | Date: | Tue, 19 Dec 2000 16:15:40 +0000 |
| Subject: | Re: localisation in web applications | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31056@lists.php.net to get a copy of this message | ||
For Dreamtime, the way I implemented this was to look at
HTTP_ACCEPT_LANGUAGE as a key to figure out which translation file to use,
and then each translation file contains keys and values:
welcome1||Welcome to Dreamtime
login4||Please log in:
In the code, you can do something like:
echo dt_xl('admin','welcome1');
and it looks up message welcome1 in a file 'admin-en.xlt' and returns it.
For better performance in heavily message-oriented sites we should probably
use DBM or something. I'm also working on extending this to the template
engine so that it looks up optional templates depending on language.
- Tim
----- Original Message -----
From: "Juergen Kaatz" <kaatz@e-commerceit.de>
To: <php-general@lists.php.net>
Sent: Monday, December 18, 2000 1:51 PM
Subject: [PHP] localisation in web applications
> I'm looking for an existing tool, idea ... to localize a webapplication
for
> different languages.