#9 ✓resolved
Yaroslav Markin

I18n should save existing translations when switching backends

Reported by Yaroslav Markin | September 14th, 2008 @ 07:19 PM

We probably should save existing translations in I18n when switching backends.

An example may be http://github.com/yaroslav/russi...

What do you think? How about patching #backend= ?

Comments and changes to this ticket

  • Sven Fuchs

    Sven Fuchs September 15th, 2008 @ 09:36 AM

    • State changed from “new” to “resolved”

    Hi Yaroslav,

    it's funny that we've started to fix the same problem in three different places this week.

    We've investigated several options to fix this and believe that the best option is to push back the actual translation loading until the last possible point, i.e. lazy-load translations.

    Implemented in:

    http://github.com/svenfuchs/i18n... and http://github.com/svenfuchs/i18n...

    This allows us to swap the backend at any time during Rails' init process. It's not possible to swap it afterwards any more though.

    One problem with your approach is that the swapping backend needs to assume that the backend behaves in a way similar to the Simple backend. We believe we can't make this assumption safely.

    I'll close this ticket. Please reopen it if you think the solution is not sufficient.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Internationalization API for Ruby.

This library is used in Ruby on Rails but also suited for use in other contexts.

People watching this ticket

Attachments

Tags

Pages