diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-01-27 13:15:34 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-01-27 13:15:34 +0000 |
commit | 7a758a657e10c5b6a11355c9dad205178342096f (patch) | |
tree | f83cccdf28c68697966420c183259dd6aa6ac06b /lib/gettext_setup.rb | |
parent | ece7981356e8b5dc9dd81a34b54f0666a81a462b (diff) |
Add examples of how a user might customise:
* routes
* gettext translations
* categories
Diffstat (limited to 'lib/gettext_setup.rb')
-rw-r--r-- | lib/gettext_setup.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/gettext_setup.rb b/lib/gettext_setup.rb new file mode 100644 index 0000000..5b7a455 --- /dev/null +++ b/lib/gettext_setup.rb @@ -0,0 +1,14 @@ +# Add a callback - to be executed before each request in development, +# and at startup in production - to plug in theme locale strings. +require 'dispatcher' +Dispatcher.to_prepare do + repos = [ + FastGettext::TranslationRepository.build('app', :path=>File.join(File.dirname(__FILE__), '..', 'locale-theme'), :type => :po), + FastGettext::TranslationRepository.build('app', :path=>'locale', :type => :po) + ] + FastGettext.add_text_domain 'app', :type=>:chain, :chain=>repos + FastGettext.default_text_domain = 'app' +end + + + |