locale support?

new topic     » topic index » view thread      » older message » newer message

I finished documenting datetime.e:

http://jeremy.cowgar.com/euphoria/lib_dtm.htm

And it has a format function that allows you to:

d = new(2008, 5, 2, 12, 58, 32)
s = format(d, "%A, %B %d '%y %H:%M%p")
-- s is "Friday, May 2 '08 12:58PM"


So, the problem is not that the format function cannot support other languages
(because it can), but how to deal with locale support. Right now, in datetime.e
there are a few sequences titled things like: month_names, month_abbrs,
day_names, day_abbrs. Those are global sequences that format() uses to populate
the resulting string with.

If you do not speak English, you can easily change the content of those global
sequences and format will happily use your language to format the date/time.
However, do we need a greater support? i.e. should I introduce a locale.e or
something?

For instance, the GNU C locale support has abilities for dates, times, numbers,
money, etc...

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu