aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-02-25 14:37:10 +0000
committerSeb Bacon <seb.bacon@gmail.com>2011-03-10 10:54:09 +0000
commit4cf6fa88b9ce563d0df560586e4166ec87dd0f02 (patch)
tree82fd7aaec3b607bd23991b806ad2692551c0b068
parentda7bbcf5ec0caaef72e6e6622cf4247092b6ea30 (diff)
load available locales from our local config file
-rw-r--r--config/environment.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/environment.rb b/config/environment.rb
index 7c0f59305..ea92e4d99 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -19,6 +19,7 @@ $:.push(File.join(File.dirname(__FILE__), '../commonlib/rblib'))
# ruby-ole and ruby-msg. We use a custom ruby-msg to avoid a name conflict
$:.unshift(File.join(File.dirname(__FILE__), '../vendor/ruby-ole/lib'))
$:.unshift(File.join(File.dirname(__FILE__), '../vendor/ruby-msg/lib'))
+$:.unshift(File.join(File.dirname(__FILE__), '../vendor/plugins/globalize2/lib'))
require 'memcache'
@@ -110,6 +111,11 @@ if (MySociety::Config.get("DOMAIN", "") != "")
}
end
+# fallback locale and available locales
+I18n.default_locale = :en
+available_locales = MySociety::Config.get('AVAILABLE_LOCALES', 'en')
+FastGettext.default_available_locales = available_locales.split(/ /)
+
# Load monkey patches and other things from lib/
require 'tmail_extensions.rb'
require 'activesupport_cache_extensions.rb'