Re: locale support?

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

> On 2 May 2008 at 10:18, Jeremy Cowgar wrote (maybe snipped):

> 
> 
> posted by: Jeremy Cowgar <jeremy at c??gar.com>
> 
> I finished documenting datetime.e:
> 
> http://jeremy.cowgar.com/euphoria/lib_dtm.htm
> 
> And it has a format function that allows you to:
> 
> }}}
<eucode>
> 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"
> </eucode>
{{{

> 
> 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?
> 
Definitely, yes! I fully support the motion and I'm voluteering to do 
my part in translation. All I need is original text in English and 
commenting for disambiguation.

Question: would namespace be applicable here? So...

d = br:new(2008, 5, 2, 12, 58, 32)
s = format(d, "%A, %d de %B de %Y %H:%M")
-- s is "Sexta, 2 de Maio de 2008 12:58"


Best,
Euler

-- 
_
_| euler f german
_| sete lagoas, mg, brazil
_| efgerman{AT}gmail{DOT}com
_| -----------------------------
_| Reply preferably to the list,
_| or to the address above. Thx!

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

Search



Quick Links

User menu

Not signed in.

Misc Menu