Sha256: 05f5726555143b37af94a6dcdc7260d718b11f4709055936f7974e426d6dad61

Contents?: true

Size: 520 Bytes

Versions: 2

Compression:

Stored size: 520 Bytes

Contents

# Add our own locales to load_path

skyline_locales = Dir[Skyline.root + "config/locales/*.{yml,rb}"]

# We'll be inserting our locales before the default config/locales directive
idx = I18n.load_path.index(I18n.load_path.grep(/#{Rails.root}\/config\/locales.+/).first)

if idx
  I18n.load_path.insert(idx,*skyline_locales)
else
  skyline_locales.each do |locale|
    I18n.load_path << locale
  end
end

# And we set a default (this can be overridden in an intializer)
I18n.locale = "en-US"
I18n.default_locale = "en-US"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
skylinecms-3.3.0 config/initializers/locales.rb
skylinecms-3.2.0 config/initializers/locales.rb