I am trying to store a default translation if a translation is missing in Rails.
After much struggle I came up with this:
backend = I18n.backend
if not backend.exists?(locale, key)
backend.store_translations(locale, {key => locale.to_s + "-" + key.to_s})
end
The problem is, it stores the default values but it does not find them. Any idea what is wrong here?