class Middleman::CoreExtensions::Internationalization

def after_configuration

def after_configuration
  # See https://github.com/svenfuchs/i18n/wiki/Fallbacks
  unless options[:no_fallbacks]
    require 'i18n/backend/fallbacks'
    ::I18n::Backend::Simple.send(:include, ::I18n::Backend::Fallbacks)
  end
  locales_file_path = options[:data]
  # Tell the file watcher to observe the :data_dir
  app.files.watch :locales,
                  path: File.join(app.root, locales_file_path),
                  only: /.*(rb|yml|yaml)$/
  # Setup data files before anything else so they are available when
  # parsing config.rb
  app.files.on_change(:locales, &method(:on_file_changed))
  @maps = {}
  @mount_at_root = options[:mount_at_root].nil? ? locales.first : options[:mount_at_root]
  configure_i18n
  logger.info "== Locales: #{locales.join(', ')} (Default #{@mount_at_root})"
end