[LRUG] Rails i18n

Matthew Rudy Jacobs matthewrudyjacobs at gmail.com
Wed May 20 05:29:37 PDT 2015


I'd say the answer *is* give them a custom locale.

I'd set them to the locale "en-GB-barIsBaz"

And use "Fallbacks": "en-GB-barIsBaz" -> "en-GB" -> "en".

On 20 May 2015 at 20:20, Andrew Stewart <boss at airbladesoftware.com> wrote:

> 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
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> Archives: http://lists.lrug.org/pipermail/chat-lrug.org
> Manage your subscription: http://lists.lrug.org/options.cgi/chat-lrug.org
> List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20150520/50b0f6a1/attachment.html>


More information about the Chat mailing list