-------- Original Message --------
Subject: Re: ICU ResourceBundles for ext/unicode
Date: Sun, 31 Dec 2006 13:11:26 +0100
From: Michael Wallner <
mike@...>
To: Norbert Lindenberg <
Norbert.Lindenberg@...>
CC: Andrei Zmievski <
andrei@...>
Newsgroups: php.i18n
References: <
A759ED92-D191-4F94-A72D-C026C2E98127@...>
Norbert Lindenberg wrote:
> Hi all,
Hi Norbert!
> The ICU style of resource bundles is Unicode based, but also seems more
> complicated than desirable for PHP. It's designed for a statically typed
> environment and requires compilation, neither of which fit in well with
> PHP.
That's probably true. But the same applies to the past and gettext.
>
> I'd rather start with Java properties files, the simplest and most
> widely used form of Java resource files. I'd adapt them to PHP 6 by
> switching their encoding to UTF-8, adopting heredocs, and simplifying
> their syntax. I'd drop the secondary fallback mechanism, in which
> resource bundles can inherit individual resources from other bundles.
> This is an optimization to reduce the size of bundles at the expense of
> runtime overhead and additional work in creating the bundles. The
> additional step of finding common resources and moving them to shared
> bundles is rarely made in normal localization processes, and the space
> savings don't matter much for PHP, where bundles remain on the server.
> Dropping the secondary fallback also means that we can simplify the
> resource bundle to just an array.
> [...]
> What do you think?
The idea is quite confusing to me...
I don't see any compelling reasons to create a new file format and write
a parser for it from scratch. I could understand if you suggested to implement
a parser for plaintext ICU resourcebundle templates, which would extinct the
compilation process and wouldn't benefit from the fallback mechanism. I guess
we could even exploit icu/source/tools/genrb/parse.c for that matter.
Regards,
--
Michael
--
Michael
--
PHP Unicode & I18N Mailing List (
http://www.php.net/)
To unsubscribe, visit:
http://www.php.net/unsub.php