From isak.hansen at gmail.com Mon Jan 7 09:30:03 2008 From: isak.hansen at gmail.com (Isak Hansen) Date: Mon, 7 Jan 2008 15:30:03 +0100 Subject: [Rails I18n] L10n of numbers? Message-ID: <6b9e1eb20801070630nf7cad4cm6cb54bc62e1a5162@mail.gmail.com> I need to localize numbers in text fields and have been looking at the various L10n plugins that claim to have number support. Support seems to mean that the plugin includes a Number#to_localized_string method, which isn't very useful for my purposes. I figure I could build my own numeric_field helper easy enough; the question is how I'd go about parsing the input before it reaches Rails. Currently I'm thinking along the lines of prefixing the field names with some string, e.g. 'numeric_value_', parsing the (possibly nested) parameter hash (from a before filter?) looking for these things, and then adding them back into params as standard English-formatted numbers without the prefix. Thoughts/feedback..? Regards, Isak