Module: WillPaginate::I18n
- Included in:
- ViewHelpers
- Defined in:
- lib/will_paginate/i18n.rb
Class Method Summary (collapse)
Instance Method Summary (collapse)
Class Method Details
+ (Object) load_path
7 8 9 |
# File 'lib/will_paginate/i18n.rb', line 7 def self.load_path Dir["#{locale_dir}/*.{rb,yml}"] end |
+ (Object) locale_dir
3 4 5 |
# File 'lib/will_paginate/i18n.rb', line 3 def self.locale_dir File.('../locale', __FILE__) end |
Instance Method Details
- (Object) will_paginate_translate(keys, options = {})
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/will_paginate/i18n.rb', line 11 def will_paginate_translate(keys, = {}) if defined? ::I18n defaults = Array(keys).dup defaults << Proc.new if block_given? ::I18n.translate(defaults.shift, .merge(:default => defaults, :scope => :will_paginate)) else key = Array === keys ? keys.first : keys yield key, end end |