Skip to content

Commit

Permalink
refinement: during Dir[] to loop over locales automatically (so you c…
Browse files Browse the repository at this point in the history
…an just drop them in without having to edit init.rb)
  • Loading branch information
Kieran Pilkington committed Jul 9, 2009
1 parent 59d5aa3 commit 7b24779
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ So far, the working options are:

This engine uses the I18n features of Rails 2.2 and later to allow for easily translation of the search source interface, and output.

Locales are stored in config/locales inside the engine directory. When locales are completed, they are added to an array in init.rb that adds each to the I18n load path.
Locales are stored in config/locales inside the engine directory. When locales are completed, they are added to I18n load path automatically when the application is started (this is done in the engines init.rb).

To use your own strings, open up the locale of your choice in an editor of your choice and change them to suit.

Expand Down
4 changes: 2 additions & 2 deletions init.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
['en'].each do |locale|
I18n.load_path.unshift(File.dirname(__FILE__) + "/config/locales/#{locale}.yml")
Dir[File.join("#{File.dirname(__FILE__)}/config/locales/*.yml")].each do |locale|
I18n.load_path.unshift(locale)
end

ActionController::Base.send(:helper, SearchSourcesHelper)
Expand Down

0 comments on commit 7b24779

Please sign in to comment.