Displaying 1 result from an estimated 1 matches for "gettext_extension".
2005 Mar 17
2
Using gettext to localize your rails app
...(''messages'', "#{RAILS_ROOT}/locale",
@locale, @charset)
# after this, i can call _(''Cancel'') in the controller and this will
# return => "Abbrechen" for de_DE (German)
end
I want to be able to use _() everywhere, so I have a
lib/gettext_extension.rb file that says:
require ''gettext''
include GetText # we want to be able to translate everywhere
Nevertheless, I cannot use _() anywhere but in the controller. If I want
to use it in say editor.rhtml I have to do this:
# app/views/blocks/editor.rhtml:
<% bindtextdomain('...