mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 11:14:24 +08:00
11 lines
303 B
Ruby
11 lines
303 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class CustomI18nBackend < I18n::Backend::Simple
|
||
|
attr_accessor :date_format
|
||
|
|
||
|
def localize(locale, object, format = :default, options = {})
|
||
|
options[:date_format] ||= @date_format || Constants::DEFAULT_DATE_FORMAT
|
||
|
super(locale, object, format, options)
|
||
|
end
|
||
|
end
|