you should be able to use #{...} in the param attribute.
<view:description-de param="description-#{'I18n.locale' == 'de' ?
'de' : 'en'} />
If this is a common pattern you certainly should make a helper for
it. Though I wonder if you'd be better off using straight
translations with ht etc.
On Sep 22, 2:32 am, val2many <[email protected]> wrote:
> Hi!
>
> I am localizing my app by hand using variable to determine my current
> locale: I18n.locale
>
> Currently I do sth. like:
>
> <% unless "#{I18n.locale}" == "de" %>
> <view:description-de param="description-en"/>
> <% else %>
> <view:description-de param="description-de"/>
> <% end %>
>
> I know! that is not dry at all.
>
> I would prefer to insert the locale dynamically in the <view: ... />
>
> Does anyone have an idea how to achieve that?
>
> Thanks,
>
> Valentin
--
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.