I have an issue with the interpolation of value in my strings, i ask for the related_links strings and i receive a hash with the title and the url.
this is my .yml
user:
subject: "New project created: %{title}"
related_links:
- title: Project Created
url: 'projects/%{id}'
When i ask for I18n.t("user.releated_links", id: xx)
I get
{title: "Project Created", url: "projects/%{id}"}
DO any of you know how i can pass my parameters to related_links and it can interpolate the strings in the hash ?
I think you meant to use I18n.t("user.releated_links.url", id: xx)
.
You are missing the last key.
As a side note: Are you sure you want to generate URL from the localization files? Assuming those are links within your application, why don't you better use the rails helpers?