rubyonrailsin

A Ruby and Rails talk

Tuesday, March 30, 2010


[Rails] using haml in internationalisation with haml views

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

I'm trying to use haml in my locale files but cant get it to parse.
en.yml
---------
page:
content: "
%p
some paragraph
%p
another paragraph
"

view.html.haml
------------------- (works)
=Haml::Engine.new(t('page.content)).render

-------------------(does not)
=t('page.content)

is the first example the only way to do this?
or am I going about this all wrong?

--
Rob Aldred
http://robaldred.co.uk

--
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@googlegroups.com.
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.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive