Commit ea8af2d7c442eb5cbcd688892e65f4186aabf098
1 parent
b44f870c
Exists in
master
and in
29 other branches
ActionItem172: implementing #available_locales in Noosfero module
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1566 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
lib/noosfero.rb
@@ -19,6 +19,9 @@ module Noosfero | @@ -19,6 +19,9 @@ module Noosfero | ||
19 | class << self | 19 | class << self |
20 | attr_accessor :locales | 20 | attr_accessor :locales |
21 | attr_accessor :default_locale | 21 | attr_accessor :default_locale |
22 | + def available_locales | ||
23 | + Dir.glob(File.join(RAILS_ROOT, 'locale', '*')).map { |f| File.basename(f) } | ||
24 | + end | ||
22 | end | 25 | end |
23 | 26 | ||
24 | private | 27 | private |