# Fallback and ActiveRecord backends together

**URL:** <https://www.ruby-forum.com/t/fallback-and-activerecord-backends-together/182729>\
**Category:** Rails I18n\
**Created:** [February 2, 2010, 1:29am UTC](https://www.ruby-forum.com/t/fallback-and-activerecord-backends-together/182729 "2010-02-02T01:29:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pietro\_ferrari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pietro\_ferrari](https://www.ruby-forum.com/u/pietro_ferrari)\
**Post date:** [February 2, 2010, 1:29am UTC](https://www.ruby-forum.com/t/fallback-and-activerecord-backends-together/182729/1 "2010-02-02T01:29:27Z")

</div>

Hi all,

I’m trying to use the Fallback and ActiveRecord backends together. I  
created a initializer that has:

I18n.backend = I18n::Backend::ActiveRecord.new  
I18n::Backend::ActiveRecord.send(:include, I18n::Backend::Fallbacks)

but whenever a validation message needs to be translated i get this  
error:

translation data {:“translation missing: de, i18n, plural, keys”=\>nil}  
can not be used with :count =\> 1

has anyone been successful in combining both backends?

pietro.

---

<div class="post-metadata">

**Author:** ![pietro\_ferrari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/67e7ee/32.png) [@pietro\_ferrari](https://www.ruby-forum.com/u/pietro_ferrari)\
**Post date:** [February 27, 2010, 3:49pm UTC](https://www.ruby-forum.com/t/fallback-and-activerecord-backends-together/182729/2 "2010-02-27T15:49:20Z")

</div>

Helo Pietro,

I suffered from the same problem and found the solution: extending the  
backend instance instead of including into the class.  
Here the deciding part of my initializer:

I18n.backend = I18n::Backend::ActiveRecord.new  
I18n.backend.extend(I18n::Backend::Fallbacks)

(And I have no idea why that works and not the other.)

Best Regards,  
Arndt
