[Rails] Re: Accessing array elements directly in Rails translations
On Feb 23, 10:14 pm, Valery Kvon <adda...@gmail.com> wrote:
> On 24.02.2012, at 1:12, Alex Duck wrote:
>
> > On Feb 23, 9:42 pm, Valery Kvon <adda...@gmail.com> wrote:
> >> On 24.02.2012, at 0:26, Alex Duck wrote:
>
> >>> phones:
> >>> - (123) 456-7890
> >>> - +1987654321
> >>> - 1-890-123-456
>
> >> Try to quote them
>
> > Quote them how? Can you give an example please?
>
> something like:
>
> phones:
> - "(123) 456-7890"
> - "+1987654321"
> - "1-890-123-456"
Sorry, I made a mistake in my example. You are correct, of course. In
my above example, quoting is needed, of course.
So given this YAML, how can I get to any specific element in the array
by calling Rail's t() helper only?
en:
contact_page:
title: Contact us
phones:
- "(123) 456-7890"
- "+1987654321"
- "1-890-123-456"
--
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home