[cl-l10n-devel] cldr refactoring/experiment

Sean Ross rosssd at gmail.com
Fri Nov 7 11:41:12 UTC 2008



On 6 Nov 2008, at 23:37, Attila Lendvai wrote:
>> i've created a branch at
>>
>> darcs get http://common-lisp.net/project/cl-l10n/darcs/cl-l10n.cldr/
>
> dear list,
>
> i'm happy to inform you that meanwhile we've switched our codebase to
> this branch and it seems to serve us well.
>
> until now the main obstacle was the lack of support for format
> patterns defined by cldr, but we've created compilers for most of them
> finally.
>
> these compilers parse things like "yyyy. MMMM d." or "#,##0.###" and
> emit lambdas that do the specified formatting. this is similar to how
> cl-ppcre works: splitting up computation to a compile-time and
> runtime, where compile-time really means to do parts of the
> computation and return some lambda's that capturing this partial
> result can produce the final result. so there's no cl:compile
> involved...
>
> you can try things like:
>
> CL-L10N> (funcall (with-locale "hu"
>                    (compile-date-pattern/gregorian-calendar "EEEE d
> 'foo' MMMM 'bar' yyyy"))
>                  *standard-output*
>                  (local-time:parse-timestring "2000-01-22"))
> szombat 22 foo január bar 2000
> NIL
>
> i'm planning to merge this back into the official branch in a few
> weeks, but please take a look and speak up if there's something on
> your mind! especially you Sean, as you are the owner of the project...
> i don't want to sound like the maintainer.
>

You may as well be, for all the work I've done on this in the past  
couple of years.

I'm quite happy, provided there is some sort of documentation, for the  
master branch
to change to the cldr branch.  I'm very happy with the dependency on  
local-time, having these two
systems playing nicely together is a great thing.

At a quick glance the only thing that i found noticeably missing was  
the ability to pass in
custom formatting strings to %format-date and format-date/gregorian- 
calendar.
Come to think of it, it would be nice to be able to pass these in to  
all the formatting functions.

sean.





More information about the cl-l10n-devel mailing list