Module: WillPaginate::I18n

### Home Classes Methods

### In Files

- lib/will_paginate/i18n.rb

### Methods

- ::load_path
- ::locale_dir
- #will_paginate_translate

### Class/Module Index

Quicksearch

- WillPaginate
- WillPaginate::ActionView
- WillPaginate::ActionView::LinkRenderer
- WillPaginate::ActiveRecord
- WillPaginate::ActiveRecord::BaseMethods
- WillPaginate::ActiveRecord::Pagination
- WillPaginate::ActiveRecord::RelationMethods
- WillPaginate::Collection
- WillPaginate::CollectionMethods
- WillPaginate::DataMapper
- WillPaginate::DataMapper::CollectionMethods
- WillPaginate::DataMapper::Pagination
- WillPaginate::Deprecation
- WillPaginate::Deprecation::Hash
- WillPaginate::I18n
- WillPaginate::InvalidPage
- WillPaginate::Merb
- WillPaginate::Merb::LinkRenderer
- WillPaginate::PageNumber
- WillPaginate::PerPage
- WillPaginate::PerPage::Inheritance
- WillPaginate::Railtie
- WillPaginate::Railtie::ControllerRescuePatch
- WillPaginate::Railtie::ShowExceptionsPatch
- WillPaginate::SequelMethods
- WillPaginate::Sinatra
- WillPaginate::Sinatra::Helpers
- WillPaginate::Sinatra::LinkRenderer
- WillPaginate::ViewHelpers
- WillPaginate::ViewHelpers::LinkRenderer
- WillPaginate::ViewHelpers::LinkRendererBase
- Array
- Object

No matching classes.

# WillPaginate::I18n

### Public Class Methods

load_path() click to toggle source

    # File lib/will_paginate/i18n.rb, line 7
    def self.load_path
      Dir["#{locale_dir}/*.{rb,yml}"]
    end

locale_dir() click to toggle source

    # File lib/will_paginate/i18n.rb, line 3
    def self.locale_dir
      File.expand_path('../locale', __FILE__)
    end

### Public Instance Methods

will_paginate_translate(keys, options = {}) click to toggle source

    # File lib/will_paginate/i18n.rb, line 11
    def will_paginate_translate(keys, options = {})
      if defined? ::I18n
        defaults = Array(keys).dup
        defaults << Proc.new if block_given?
        ::I18n.translate(defaults.shift, options.merge(:default => defaults, :scope => :will_paginate))
      else
        key = Array === keys ? keys.first : keys
        yield key, options
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.