[Solar-talk] Solar locale keys to Solar_Base?
Paul M Jones
pmjones at ciaweb.net
Mon May 28 14:20:00 PDT 2007
On Apr 14, 2007, at 2:17 PM, Antti Holvikari wrote:
> Hi All!
>
> I have a problem with locale string inheritance because the top level
> locale keys in Solar/Locale are not inherited when I'm using three
> vendors at the same time. This is because the vendor in the middle
> never gets added to the locale class stack.
>
> So, what if you moved all the Solar-level locale keys to Solar_Base?
> This would make sense since every class is inherited from Solar_Base.
> Also, this way you wouldn't need to add Solar as the final fallback
> since Solar_Base is naturally one of the inhe
>
> I'm sure, Paul, that you've thought about this. Am I missing
> something here?
Funny, I *hadn't* thought about that aspect. You're right, the top-
level keys for a separate vendor hierarchy would not be added.
However, instead of putting the Locale strings under Solar_Base, it
might be better to have Solar_Locale look at the vendor name of the
class, and fall back to Vendor/Locale just before falling back to
Solar/Locale. So for Vendor_Foo, the series would be:
1. Vendor/Foo/Locale
2. Vendor/Locale
3. Solar/Locale
Do you think that would help?
--
Paul M. Jones <http://paul-m-jones.com>
Solar: Simple Object Library and Application Repository
for PHP5. <http://solarphp.com>
Join the Solar community wiki! <http://solarphp.org>
Savant: The simple, elegant, and powerful solution for
templates in PHP. <http://phpsavant.com>
More information about the solar-talk
mailing list