Module: I18nData::LiveDataProvider
- Extended by:
- ActiveSupport::Memoizable, LiveDataProvider
- Included in:
- LiveDataProvider
- Defined in:
- lib/i18n_data/live_data_provider.rb
Overview
fetches data online from debian svn
Constant Summary collapse
- XML_CODES =
{ :countries => 'http://svn.debian.org/viewsvn/*checkout*/pkg-isocodes/trunk/iso-codes/iso_3166/iso_3166.xml', :languages => 'http://svn.debian.org/viewsvn/*checkout*/pkg-isocodes/trunk/iso-codes/iso_639/iso_639.xml' }
- TRANSLATIONS =
{ :languages => 'http://svn.debian.org/viewsvn/*checkout*/pkg-isocodes/trunk/iso-codes/iso_639/', :countries => 'http://svn.debian.org/viewsvn/*checkout*/pkg-isocodes/trunk/iso-codes/iso_3166/' }
Instance Method Summary collapse
Instance Method Details
#codes(type, language_code) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/i18n_data/live_data_provider.rb', line 21 def codes(type,language_code) language_code = language_code.upcase if language_code == 'EN' send("english_#{type}") else translated(type,language_code) end end |