Sha256: dd6ced3568ec189c588dc26b849400b1e0b07ce2c96ae07a2363b7d3f63926f8
Contents?: true
Size: 605 Bytes
Versions: 3
Compression:
Stored size: 605 Bytes
Contents
module Lolita module I18nHelper def locale_options (::I18n::available_locales).collect{|locale| [::I18n.t(locale, :default => locale), locale] unless [::I18n.default_locale,@active_locale].include?(locale) }.compact.insert(0,[::I18n.t("lolita-i18n.choose-other-language", :default => ::I18n.t("lolita-i18n.choose-other-language", :locale => "en")),""]) end def show_translation key ::I18n.t(key, :locale => @active_locale, :default => '') end def is_untranslated key ::I18n.t(key, :locale => @active_locale, :default => "").blank? end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lolita-i18n-0.3.2 | app/helpers/lolita/i18n_helper.rb |
lolita-i18n-0.3.1 | app/helpers/lolita/i18n_helper.rb |
lolita-i18n-0.3.0 | app/helpers/lolita/i18n_helper.rb |