0

I have a rails app the uses the standard i18n translations gem. It's a multi-tenant app and relies on parsing the current tenant from the subdomain.

en:
  foo:
    bar: "Welcome to %{subdomain}"

I have a few keys (e.g. subdomain above) that I'm using very often in my translations. In my view I have to keep passing in the same key in various places

t("foo.bar", subdomain: current_subdomain)

Is there a way I can specify a default set of keys (like subdomain) that are always passed to the translations by default so I don't have to type it out all the time?

Thanks!

user2490003
  • 10,706
  • 17
  • 79
  • 155

1 Answers1

0

I'm using gem route_translator for some solutions.

Vetal4eg
  • 182
  • 1
  • 6
  • 17