6 replies [Last post]
CpILL's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 549
Was this information Helpful?

I've stumbled upon the Common Locale Data Repository (CLDR) project which is part of the Unicode project. Its attempting to provide the following Locate info/settings for ALL cultures in an XML format:

  • Dates/time formats
  • Number/Currency formats
  • Measurement System
  • Collation Specification
  • Sorting
  • Searching
  • Matching
  • Translated names for language, territory, script, timezones, currencies,…
  • Script and characters used by a language

I think if an web-app is planning to take localisation seriously then this could solve a lot of hastles. If one could develop a parser for these locate files then the CLDR project would keep them up-to-date.

There is an overview of the data in Powerpoint format.

Anyway, just a thought Smiling

Uberdevelopment www.tsd.net.au/blog

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: A way to Localise for everywhere

Great find, and a great idea. Thanks for the link, CpILL. Downloaded the presentation for review...

CpILL's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 549
Hey Ryan, I was thinking a

Hey Ryan,

I was thinking a simple process of using SimpleXML to parse the data of a given locate (e.g. en-US) and then wrapping this in an object which would provide an standard interface to accessing the different bits (in case the XML format changes).

You would first have to import the general data then the specific over the top i.e. for en-US you'd first parse en.xml and then merge with en-US.xml

I would say this is the way forward for I18n for UC and for Drupal in general as this data is updated and maintained by nearly all the major software publishers.

I was thinking about implementing a wrapper module for Drupal to use this data generally, but I admit it might be a big job. Even bigger to get people to start using it within their modules.

Anyway, it needs to be done I think.

Uberdevelopment www.tsd.net.au/blog

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Hey Ryan, I was thinking a

I'd definitely be behind the effort and make sure we had some time scheduled to do code review and implementation in Ubercart. I know japerry@drupal.org was interested in working this out in Ubercart, too, so there's general community interest as well.

doomed@drupal.org's picture
Offline
Bug Finder
Joined: 04/05/2008
Juice: 334
Hey I read quickly into the

Hey

I read quickly into the first page of that site but didnt read the Powerpoint overview.

Just one question, is this like a shared database of "strings" that member developers can use on their own program?

And by doing that, they can use all the available (ready-to-use) translations?

CpILL's picture
Offline
Early adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/08/2007
Juice: 549
Re: Hey I read quickly into the

Spot on. Its maintained by a big list of software manufacturers as they all use it in their code. Its not specific to PHP. Also the translations are produced by the governments (or appointed work groups by the governments) themselves so it should be fairly reliable. PHP doesn't have built in support for it (yet) and nobody in the Drupal community is talking about it (except here).

A general module would certainly benefit all localisation attempts by any module developers. I guess I really won't have time to do anything on this until after Xmas as I'll be on holiday from 19th Dec. - 26th Jan. but perhaps we could get a work group together to start looking at this and where people can register their interest (or would that place just be this thread?).

I'm proposing designing an object (Singleton I'm thinking) that provides a standard interface such as functions for formatting different date representations, currency etc according to a given locate. The standard interface to protect against change to the data structures.

Uberdevelopment www.tsd.net.au/blog

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Hey I read quickly into the

I'd jump on that. After Christmas / New Years' would be good for me, too.