Class: I18nFactory::Locale

Inherits:
Object
  • Object
show all
Defined in:
lib/i18n_factory/locale.rb

Class Method Summary collapse

Class Method Details

.allObject



3
4
5
6
7
8
9
# File 'lib/i18n_factory/locale.rb', line 3

def self.all
  if I18nFactory.config.locales.any?
    I18nFactory.config.locales.map(&:to_s)
  else
    [default]
  end
end

.defaultObject



11
12
13
# File 'lib/i18n_factory/locale.rb', line 11

def self.default
  I18n.locale.to_s
end