I''m try this groovy i18n stuff for formatting my dates in UK format. Console tests seem to show me I have it configured properly but I''m not 100%. How do I set up the app so that in a view when I do <%= Person.first.birthday %> it shows in UK format as specified in my i18 config file. Currently it''s ignoring it. I have to explicitly tell the view to use the i18 config for it to work. What am I missing here or is this intended behaviour? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Oct 7, 8:51 am, bingo bob <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I''m try this groovy i18n stuff for formatting my dates in UK format. > > Console tests seem to show me I have it configured properly but I''m not > 100%. > > How do I set up the app so that in a view when I do > > <%= Person.first.birthday %> > > it shows in UK format as specified in my i18 config file. Currently it''s > ignoring it. > > I have to explicitly tell the view to use the i18 config for it to work. > > What am I missing here or is this intended behaviour?Use I18n.l (short for I18n.localize, also available as just l in views) Fred> -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> Use I18n.l (short for I18n.localize, also available as just l in > views) > > FredAha, that explains it - so it is intended behaviour! Thanks *again* for such a quick and clear and helpful response Fred. :-). bb. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
bingo bob wrote:>> Use I18n.l (short for I18n.localize, also available as just l in >> views) >> >> Fred > > Aha, that explains it - so it is intended behaviour! > Thanks *again* for such a quick and clear and helpful response Fred. > :-). > bb.Also, please consider using fast_gettext instead of the (IMHO much clumsier) default Rails I18N. fast_gettext uses the Rails I18N interface, but works with string keys (instead of symbolic ones) and PO files that are nicer to use and reasonably standard in the industry. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.