[0.0.5, Important, Urgent] The usage of number/date locales

0 views
Skip to first unread message

Maciej Piechotka

unread,
Jul 4, 2008, 9:01:54 AM7/4/08
to Merb Global Mailing List
Unfortunately it seems that the direct solution (with setting the
locale) would be impossible as it may break ruby on the C-level.

1. Have an external program to handle the conversion. For date:
def localize_time(timem format)
`date -d "#{time.to_s}" '+#{format}'`
end

Pros: Very simple
Cons: Do not work probably on Windows without cygnus or something like
that (by the way - who sets the server on Windows?)

2. To use solution from GettextLocalize and store it internally
(translations via gettext and/or other methods)

Pros: Portable
Cons: Require additional work for translators (unless we can somehow
autogenerate them). Not DRY.

Regards

signature.asc
Reply all
Reply to author
Forward
0 new messages