[Solar-talk] Locale files
Antti Holvikari
anttih at gmail.com
Thu Aug 16 09:09:49 CDT 2007
Hi All!
Im starting the locale discussion here which we already started on #solarphp.
Ok so, the problem with the current locale implementation is that
it's a living hell trying to maintain all the locale files. They're
everywhere and you don't know if and what is missing from every file.
I would want to keep the keys grouped by class, but still be able to
define keys in one file or in as many files as I want. For example,
the files could be separated by "packages", as in pear packages. Since
Solar is distributed in one package, there really isn't a need to
separate locales to many files.
So what would the file look like? I'm thinking something along these lines:
array(
'Solar_Example' => array(
'KEY' => 'Val',
),
'Solar_Example_Other' => array(
'KEY' => 'Val',
),
)
That could be in, say, Solar/Locale/en_US.php. Now, I could still have
a locale dir in my own package 'Vendor/App/Sunny/Locale', which would
be merged to the master Solar locale array.
Now, how should we implement the locale file searching and merging?
Forcibly search under every parent class? :-(
--
Antti Holvikari
More information about the Solar-talk
mailing list