module DOTIW

Constants

DEFAULT_I18N_SCOPE
DEFAULT_I18N_SCOPE_COMPACT
VERSION

Public Instance Methods

init_i18n!() click to toggle source
# File lib/dotiw.rb, line 22
def init_i18n!
  I18n.load_path.unshift(*locale_files)
  I18n.reload!
end
languages() click to toggle source
# File lib/dotiw.rb, line 27
def languages
  @languages ||= (locale_files.map { |path| path.split(%r{[/.]})[-2].to_sym })
end
locale_files() click to toggle source
# File lib/dotiw.rb, line 31
def locale_files
  files 'dotiw/locale', '*.yml'
end

Protected Instance Methods

files(directory, ext) click to toggle source
# File lib/dotiw.rb, line 37
def files(directory, ext)
  Dir[File.join File.dirname(__FILE__), directory, ext]
end