-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
I've translated a bunch of Hobo apps to spanish. I have never used the default Date select widgets, I really prefer the Jquery Datepicker. It's very easy to install with Hobo Jquery: http://cookbook.hobocentral.net/plugins/hobo-jquery http://cookbook.hobocentral.net/api_tag_defs/hjq-datepicker And later you can translate it like this: <def tag="input" for="Date"> <hjq-datepicker dayNamesMin="&['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa']" dateFormat="dd-mm-yy" firstDay="1" monthNames="&['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre']" monthNamesShort="&['Ene', 'Feb', 'Mar', 'Abr','May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic']" merge /> </def> Not directly related, but I have some other spanish date translation tips for Hobo 1.0.1. This initializer helps a lot: config/initializers/date_formats.rb Date::DATE_FORMATS[:default] = "%d-%m-%Y" Date::DATE_FORMATS[:slashed] = "%d/%m/%Y" Date::DATE_FORMATS[:short] = "%d de %b" Date::DATE_FORMATS[:long] = "%e de %B de %Y" Time::DATE_FORMATS[:long] = "%e de %B de %Y a las %k:%M" Maybe you are also interested in a custom L10n-simplified plugin. Just download this: http://ihuerta.net/wp-content/uploads/2011/06/L10n-simplified-0.9-uyc.tar.gz. Extract it in vendor/plugins and add the following line con config/environment.rb before "Rails::Initializer.run do |config|" L10N_LANG = :es Hope it helps :) Regards, Ignacio El 04/06/11 01:11, Donald R. Ziesig escribió: > Hi All: > > I am adding Spanish to my Real Estate Web site. All is going well > except when I try to use a date selector (Drop down lists for year, > month, day). > > The English one works fine (e.g. 2011 06 03) with the months ranging > from 01 .. 12. > > The Spanish one gives strange values for the month (e.g. 2011 97 03) > with the months in the values [114, 97, 110, 115, 108, 97, 116, 105, > 111, 110, 32, 109]. > > I put the ascii values in parens to see if there was any kind of pattern > there, but it found none: > > Enero 114 (s) > Febrero 97 (a) > Marzo 110 (n) > Abril 115 (t) > Mayo 108 (l) > > etc. > > I don't care if I get valid numbers or valid names in the month list. > What do I need in app.es.yml to make this work? > > Thanks, > > Don Z. > > - -- Ignacio Huerta Arteche http://www.ihuerta.net Teléfono: 0034 645 70 77 35 Email realizado con software libre -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk304ZUACgkQBPlUJ6RHaOR4owCg2BOqF4n0f9vvq+A8hoZoxmfM 8egAnjjiSPfyPgYnGiZHCRtKm/IGrgU8 =LL+m -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
