Archive for the ‘i18n’ Category

Making ActionController::Translation#translate more like ActionView::Helpers::TranslationHelper#translate

I started using i18n support in rails. I really liked how the ActionView::Helpers::TranslationHelper#translate method works.
If the key starts with “.”, then the key is scoped to the partial. For example, if translate(”.title”) is called from the registrations/new page, then the key gets scoped to ‘registrations.new.title’. I wanted the same sort [...]

Tags: ,