Class: Jekyll::Drops::SiteDrop
- Inherits:
-
Object
- Object
- Jekyll::Drops::SiteDrop
- Defined in:
- lib/jekyll/locales/site_drop.rb
Overview
Make i18n available to Liquid as site.i18n
Instance Method Summary collapse
Instance Method Details
#i18n ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/jekyll/locales/site_drop.rb', line 9 def i18n @i18n ||= if @obj.data.key?(@obj.config['lang']) @obj.data[@obj.config['lang']] else Jekyll.logger.warn 'Locales:', "Using #{@obj.fallback_locale} as fallback of #{@obj.config['lang']}" @obj.data[@obj.fallback_locale] end end |