Method: Spider::I18n::Rails#find_locale
- Defined in:
- lib/spiderfw/i18n/rails.rb
#find_locale(locale) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/spiderfw/i18n/rails.rb', line 32 def find_locale(locale) try = locale.to_s while (try) extensions = ['yml', 'rb'] extensions.each do |ext| full_path = Spider.conf.get('i18n.rails_path')+'/'+try+'.'+ext return [full_path, try] if (File.exist?(full_path)) end if (try =~ (/^([^\.-_@]+)[\.-_@]/)) try = $1 else try = false end end end |