For the second question: You pass the :format parameter, like this:
I18n.l(Date.today, :format => :long) The default available formats are :default, :short and :long but you can add more to your locale file: http://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/sv-SE.yml#L164 On Wed, Aug 25, 2010 at 3:47 AM, Clemens Kofler <[email protected]> wrote: > Hi Hans, > > you could use my delocalize plugin for that: > http://github.com/clemens/delocalize. > > - Clemens > > On Aug 25, 2010, at 9:59 AM, Hans Marmolin wrote: > > > Hi > > > > How to localize the different methods in e.g. Date ? > > > > Tries to use Date.parse(str) with str in any language. > > I have a fix for my current problem, where str is a swedish date of the > form 12 MAJ 1983; Date.parse(str.gsub('MAJ','MAY'), > > but is there a more generic solution? > > > > How to use the different localzed date format as e.g > date.abbr_month_names ? > > Tried I18n.l(Date.today) and > > I18n.l(Date.today.strftime("%d %b %Y")) and > > I18n.l(y.wday).to_s and > > I18n.l(y).wday > > but without any success !! > > > > The problem is that I do not understand this part of I18n and the guides > give no information about the more complex use of localize? > > > > Would appreciate any help > > ____________________________________________ > > Hans Marmolin > > St: Larsgatan 50, 58224 Linköping, Sweden > > Phone: +46708371202 > > > > > > > > > > > > > > > > -- > > You received this message because you are subscribed to the Google Groups > "rails-i18n" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > [email protected]<rails-i18n%[email protected]> > . > > For more options, visit this group at > http://groups.google.com/group/rails-i18n?hl=en. > > > > Clemens Kofler > http://www.railway.at > [email protected] > > railway - welcome aboard! > > -- > You received this message because you are subscribed to the Google Groups > "rails-i18n" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<rails-i18n%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rails-i18n?hl=en. > > -- You received this message because you are subscribed to the Google Groups "rails-i18n" 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/rails-i18n?hl=en.
