[LRUG] Rails i18n

Andrew Stewart boss at airbladesoftware.com
Wed May 20 05:20:14 PDT 2015


Hello LRUG!

I have an ActiveRecord model (Foo) with a field (bar).  My locale file looks like:

en:
  activerecord:
    attributes:
      foo:
        bar: Bar

However one of the people using my Rails app is very keen that the bar field appears as Baz everywhere.

Is there a good way to provide a custom translation just for this person?  I don't want to change their locale, I just want to "override" the translation for bar.

Many thanks in advance,

Andrew Stewart


More information about the Chat mailing list