RE: [RFC] PEAR::Translation 2.0 (was: Pear::Translation,bug)
| From: | Lorenzo Alberton | Date: | Mon, 01 Dec 2003 21:41:57 +0000 |
| Subject: | RE: [RFC] PEAR::Translation 2.0 (was: Pear::Translation,bug) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24029@lists.php.net to get a copy of this message | ||
On Mon, 1 Dec 2003 12:39:36 -0000, Valberg Lárusson wrote:
> There was one behaviour in the class we wanted to change:
>
> When the same handle (string_id) is defined for
> the global text and a specific page, the class
> overrides the specific text with the global text.
>
> It seems more logical to us that the specific text
> be returned.
If you have a look at "function get()" in my code preview [1],
you'll see that I already addressed this very problem:
if you call the method like this:
get($stringID, "", ...); // (empty string)
then the global text will be returned,
while if you call the method like this:
get($stringID, null, ...); // (null string)
or simply
get($stringID); // (default value for $pageID is null)
then the page-specific text will be returned.
how does it sound?
> The attached class has an example of how this could be done
> whithout disrupting the way the constructor is presently called.
> From our point of view it would be geat if like wzielinski
> suggested that the interfaces dont change.
as I said in my other email, BC will be kept for v.1.x.
So your patch (or a similar one) can be applied to the 1.x trunk.
What I'm asking now is:
are there any suggestions for the v.2.x class?
Since it will break BC, everything is possible, but I prefer
the brainstorming taking place now, before any release,
than afterwards, when there will be BC issues again...
Best regards
Lorenzo
[1] http://cambiano.onlinein.it/pearzone/Translation/Translation.phps