Module: I18n::Region::Config
- Defined in:
- lib/i18n/region/config.rb
Instance Method Summary collapse
Instance Method Details
#lang ⇒ Object
10 11 12 |
# File 'lib/i18n/region/config.rb', line 10 def lang @lang ||= locale.to_s.split('-').fetch(0, 'en').downcase.to_sym end |
#locale=(l) ⇒ Object
4 5 6 7 8 |
# File 'lib/i18n/region/config.rb', line 4 def locale=(l) @lang = nil @region = nil super end |
#region ⇒ Object
14 15 16 |
# File 'lib/i18n/region/config.rb', line 14 def region @region ||= (r = locale.to_s.split('-')[1]) && r.downcase.to_sym end |