From ea8af2d7c442eb5cbcd688892e65f4186aabf098 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Tue, 4 Mar 2008 18:03:57 +0000 Subject: [PATCH] ActionItem172: implementing #available_locales in Noosfero module --- lib/noosfero.rb | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/lib/noosfero.rb b/lib/noosfero.rb index af2cb5b..710262a 100644 --- a/lib/noosfero.rb +++ b/lib/noosfero.rb @@ -19,6 +19,9 @@ module Noosfero class << self attr_accessor :locales attr_accessor :default_locale + def available_locales + Dir.glob(File.join(RAILS_ROOT, 'locale', '*')).map { |f| File.basename(f) } + end end private -- libgit2 0.21.2