I'd like to have some custome fallbacks for Globalize3 on Rails.
I know you can set
config.i18n.fallbacks = true
and have untranslated text fallback to its default locale, but I would rather have something that would indicate it untranslated, something like a #not tnranslated# before or after the falled back text.
For example if the default locale text is
Foo bar
I would like the fallback text shown on an un translated text be
Foo bar #not translated!#
The only way I can figure to do this is have an if else around the text and check if the current locale is translated, and that doesn't seem to elegant, something like so.
<% if article.is_translated?(I18n.locale) %>
<%= article.title %>
<% else %>
<%= article.title %>#not translated#
<% end %>
Any advice would be greatly appreciated.
How about adding a patch like this:
In case it's not clear, the two lines that I changed are these ones: