Re: Multilingual application
| From: | Julio Nobrega Trabalhando | Date: | Thu, 06 Dec 2001 15:49:00 +0000 |
| Subject: | Re: Multilingual application | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76898@lists.php.net to get a copy of this message | ||
I am using an approach similar to this:
$language_file = 'english';
include 'dir/to/languages/'.$language_file.'.inc.php';
on english.inc.php
<?php
// Errors section:
$lang['errors']['form']['empty_password'] = 'Please fill the
password';
// Miscellanious section:
$lang['misc']['on_line_users'] = 'Number of online users: ';
?>
Than you just go echoing the array elements where you want the text to
appear. It does require a little bit more of typing but the languages files
get a more clear and structured arrange, making easier to add new
words/phrases and helps people that will translate.
--
Julio Nobrega
Don't eat the yellow snow.
"Alexander Skwar" <ASkwar@DigitalProjects.com> wrote in message
news:20011206152832.GI24002@teich.Garten.DigitalProjects.com...
Hi!
I've got to develop a multilingual application.
What's the best approach to have the app multilingual? Should I use
gettext, or are there any better ways to do this?
Thanks,
Alexander Skwar
--
>> Wohnung in Gelsenkirchen und Umgebung gesucht!
<<
iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 21 hours 33 minutes