Skip to content
Browse files

Add info about I18n::Backend::Chain to I18n guide

  • Loading branch information...
1 parent 9345e9c commit 1e2ecc4d6f2bc528100d994a48118c560b87445c Brandon Tilley committed with bowsersenior Feb 19, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 railties/guides/source/i18n.textile
View
6 railties/guides/source/i18n.textile
@@ -809,6 +809,12 @@ That does not mean you're stuck with these limitations, though. The Ruby I18n ge
I18n.backend = Globalize::Backend::Static.new
</ruby>
+You can also use the Chain backend to chain multiple backends together. This is useful when you want to use standard translations with a Simple backend but store custom application translations in a database or other backends. For example, you could use the ActiveRecord backend and fall back to the (default) Simple backend:
+
+<ruby>
+I18n.backend = I18n::Backend::Chain.new(I18n::Backend::ActiveRecord.new, I18n.backend)
+</ruby>
+
h4. Using Different Exception Handlers
The I18n API defines the following exceptions that will be raised by backends when the corresponding unexpected conditions occur:

0 comments on commit 1e2ecc4

Please sign in to comment.
Something went wrong with that request. Please try again.