On 03/09/01, "Marcus" <[EMAIL PROTECTED]> wrote:
> first: when handling multilanguage support you will of cause have
> an array of supported languages like $languages=array("en_GB","de_DE"...)
[...]

Why not use gettext()?
something like this:

setlocale(LC_ALL, "en_GB");
bindtextdomain("mytranslations", "/path/to/gmofiles");
textdomain("mytranslations");
$translations = array(
  "animal" => _("Cobra"),
  ...
);
$translated_text = saprintf($text, $translations);

Then you don't need lots of different language arrays to parse.

I'm not sure that PHP should implement multi-language functions itself,
perhaps something like that could go in PEAR?

--Wez.

PS: Anyone out there got gettext working with PHP under win32?
It's on my TODO, albeit near the bottom (and it's a big list!).


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to