[uf-discuss] Currency microformat
Charles Iliya Krempeaux
supercanadian at gmail.com
Tue Jul 18 00:34:39 PDT 2006
Here's a handy list of ISO 4217 codes...
Also, here's an example of the "$" being used in (Canadian) French...
Note the placement of the dollar sign AFTER the number.
The same page in (USA) English can be seen here...
(Just some example for the "examples in the wild".)
On 7/18/06, Charles Iliya Krempeaux <charles at reptile.ca> wrote:
> (Hopefully this will get to the mailing... haven't been able to get
> through in a while. But we'll see)
> I'm actually working on a globalization of currencies project right
> now. (And have dealt with this issue in the past too.)
> For us, each user of the system has a specified locale. (Like:
> "en_US", "fr_CA", etc.) And with that locale, there is a default
> currency associated with that.
> In our system there's a PHP function that takes care of "printing"
> money. All it really does is add the proper "currency symbol" and puts
> it in the correct place (for the local).
> Although, internally, in the database, currencies info is stored in
> ISO 4217 format.
> First guess would be to use the abbr design pattenn for this --
> Maybe something like...
> Pay me <abbr class="currency" title="CAD">$</abbr>5.00 now!
> Although something like the the following might be better...
> Pay me <span class="money"><abbr class="currency"
> title="CAD">$</abbr>5.00</span> now!
> But it might be more semantic salt than is considered necessary. Just
> having the abbr with the class-currency near a number might be good
> enough. But that's open for discussion though.
> Some other things to consider... there might be an implicit currency
> that comes with what's defined in the HTML "lang" attribute. Like if
> you have lang="fr-CA" than you could assume the currency is CAD. (But
> that takes some intelligence to do that kind of mapping.)
> (Also, I know this is bad. But I don't think we are consistently
> using the "lang" attribute in our system.)
> Also, this is all just my experience. It would be useful to see what
> others are doing too.
> See ya
> On 7/17/06, Ben Buchanan <wzqtptl02 at sneakemail.com> wrote:
> > Hi all,
> > A recent discussion with a travelling friend has sparked some ideas
> > about a microformat for displaying prices and other currency-based
> > figures.
> > The classic problem example would be a page stating a price of "$50".
> > Is that Australian dollars? US dollars? Monopoly money? :)
> > So anyway I'm following The Process
> > (http://microformats.org/wiki/process) and I'm up to searching for
> > existing formats/work. So far I've only seen the ISO standard for
> > three-letter codes, no format or microformat for consistently
> > displaying them.
> > Does anyone know of relevant resources I should check out?
> > cheers,
> > Ben
Charles Iliya Krempeaux, B.Sc.
charles @ reptile.ca
supercanadian @ gmail.com
developer weblog: http://ChangeLog.ca/
Make Television http://maketelevision.com/
More information about the microformats-discuss