Re: Random thoughts
- From: Bruno Haible <bruno clisp org>
- To: Roozbeh Pournader <roozbeh farsiweb info>, Behdad Esfahbod <behdad cs toronto edu>
- Cc: GNOME Locale mailing list <locale-list gnome org>
- Subject: Re: Random thoughts
- Date: Mon, 15 Aug 2005 13:40:43 +0200
Roozbeh Pournader wrote:
> CLDR dreams about exchanging locale
> bits between platforms and applications in the XML format itself (read
> the intro to LDML).
> ...
> About locale exchange, CLDR probably talks about moving things like five
> lines of configuration data around. Let's assume that in the future a
> dynamic web page may ask for the user's locale settings, and the browser
> would answer that it's CLDR 2.7's "de_DE collation=phonebook" with the
> medium date format changed to something instead of the default.
>
> That's the kind of thing CLDR is thinking about, I believe.
We need a binary mmapable file format, because the parsing of a locale
description is very computation intensive: For glibc locales, it needs
between 1 sec and 10 sec per locale, depending on the speed of your
machine. For the CLDR locales, it is likely to be more, given that one
needs an XML parser, and even a complex one like libxml2 (due to the
requirements for inheritance), not a simple one like expat.
But I agree with you, that the step of creation of the binary locale
data files should be less explicit with "localedef", and not
require superuser permissions. One way to implement this is to cache
these files in /var/cache, or in the user's home directory. The
binary locale files could contain a list of dependency files, with
timestamp information. When the library attempts to open such a binary
file, and it notices that the dependency files have changed, it
regenerates the binary file for the particular locale.
What this means for us in the moment, is that the program that creates
the binary locale data files from the XML files must be written in
portable C, with as little dependencies as possible. Not in Perl,
not in Java, no C99, no <stdbool.h>, just plain old C and libxml2.
Bruno
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]