2. In what format should it be stored (well - the problem with every
provider but GetText)?
I.e in single table merged with Language table or in separate? etc.
Regards
Yes.
12000.localize
Date.new(2008, 06, 24).localize
etc.
Regards
OK thanks for clarifying.
I'd prefer to keep information defined statically - in Hashes, etc. -
unless it changes on a daily basis (e.g. currency conversion rates).
Do we want to reopen and add methods to String, Fixnum? (I guess maybe
I am still enough of a Java developer, to find this a little
irksome ;) )
Alex
Ok. But it should be somehow generated - may be from glibc locale files
(I need to get into it deeper and consider license problems).
> Do we want to reopen and add methods to String, Fixnum? (I guess maybe
> I am still enough of a Java developer, to find this a little
> irksome ;) )
>
It is done in rails. It is done in merb and rails - why not?
Possibly even:
"Hi! Hello %".localize % current_user.name
Instead of (or rather in addition to):
_("Hi! Hello %") % current_user.name
> Alex
Maciej
> On Tue, 2008-06-24 at 21:18 +0200, Alexander Coles wrote:
>> On Jun 24, 2008, at 9:14 PM, Maciej Piechotka wrote:
>
> Ok. But it should be somehow generated - may be from glibc locale
> files
> (I need to get into it deeper and consider license problems).
OK, agreed. Let's not reinvent the wheel. I think users should only be
required to store data that is updated continually in the database.
>> Do we want to reopen and add methods to String, Fixnum? (I guess
>> maybe
>> I am still enough of a Java developer, to find this a little
>> irksome ;) )
>>
>
> It is done in rails. It is done in merb and rails - why not?
> Possibly even:
> "Hi! Hello %".localize % current_user.name
> Instead of (or rather in addition to):
> _("Hi! Hello %") % current_user.name
>
Sure, sure. But I think it should be done to a minimal rather than
maximum extent .. we really need to think this through to avoid
conflicts/ collisions.
For example, extlib (used by DataMapper, DataObjects) adds the #t
method to String for performing translations.
Alex