Method: Faker::Config.locale
- Defined in:
- lib/faker.rb
permalink .locale ⇒ Object
[View source]
23 24 25 26 |
# File 'lib/faker.rb', line 23 def locale # Because I18n.locale defaults to :en, if we don't have :en in our available_locales, errors will happen Thread.current[:faker_config_locale] || @default_locale || (I18n.available_locales.include?(I18n.locale) ? I18n.locale : I18n.available_locales.first) end |