]> git.openstreetmap.org Git - rails.git/blobdiff - config/initializers/available_locales.rb
Remove the languages hash since we are now storing the languages in a table. Translat...
[rails.git] / config / initializers / available_locales.rb
index 171d0c66a1581c07cc1ced77d2de012bc5099cef..026be263a5c64f6f6bbc774345a92562e45ba6cd 100644 (file)
@@ -2,23 +2,17 @@
 # See http://rails-i18n.org/wiki/pages/i18n-available_locales
 module I18n
   class << self
-    def available_locales; backend.available_locales; end
+    def available_locales
+      backend.available_locales
+    end
   end
   module Backend
     class Simple
-      def available_locales; translations.keys.collect { |l| l.to_s }.sort; end
-        def langs; translations.values end
+      def available_locales
+        init_translations unless initialized?
+        translations.keys
+      end
     end
   end
 end
 
-# You need to "force-initialize" loaded locales
-I18n.backend.send(:init_translations)
-
-#AVAILABLE_LOCALES = I18n.backend.available_locales
-#RAILS_DEFAULT_LOGGER.debug "* Loaded locales: #{AVAILABLE_LOCALES.inspect}"
-
-LANGUAGES = 
-{ "en" => "English",
-  "de" => "Deutsch"
-  }