app/helpers/locomotive/base_helper.rb in locomotive_cms-2.1.4 vs app/helpers/locomotive/base_helper.rb in locomotive_cms-2.2.0
- old
+ new
@@ -190,7 +190,15 @@
#
def not_the_default_current_locale?
current_site.localized? && current_content_locale.to_s != current_site.default_locale.to_s
end
+ def localize(object, options = nil)
+ if respond_to?(:current_site) && current_site && object.respond_to?(:in_time_zone)
+ object = object.in_time_zone(current_site.timezone)
+ end
+ I18n.localize(object, options)
+ end
+ alias :l :localize
+
end
end
\ No newline at end of file