-1

I have a very long text in yml, it's supossed to have a link somewhere in the middle. I wish to be able to change the link (from my env file), but doesn't seem right to parse ENV['link'] in the yml. Thoughts?

Doe
  • 11

1 Answers1

0

You can try Passing variables to translations:

# app/views/home/index.html.erb
<%=t 'greet_username', user: "Bill", message: "Goodbye" %>

# config/locales/en.yml
en:
  greet_username: "%{message}, %{user}!"
Simple Lime
  • 10,790
  • 2
  • 17
  • 32