<?xml version="1.0" encoding="UTF-8"?>
<codes type="array">
  <code>
    <code># paste in your environment.rb

WillPaginate::ViewHelpers.pagination_options[:prev_label]=I18n.t(&quot;pagination.prev&quot;)
WillPaginate::ViewHelpers.pagination_options[:next_label]=I18n.t(&quot;pagination.next&quot;)

# and create the respective translation in your translation file
#    pagination:
#      next: &quot;pr&#243;ximo&quot; 
#      prev: &quot;anterior&quot; 
</code>
    <created-at type="datetime">2008-12-14T13:26:33Z</created-at>
    <description></description>
    <id type="integer">129</id>
    <language-id type="integer">39</language-id>
    <privated type="boolean">false</privated>
    <title>translating will paginate</title>
    <updated-at type="datetime">2008-12-14T13:26:33Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
  <code>
    <code># 1) model:

  def self.per_page
    10
  end

# 2) helper:

  def paginate_range(in_collection, in_tot_count)
    endnumber = in_collection.offset + in_collection.per_page &gt; in_tot_count ? 
      in_tot_count : in_collection.offset + in_collection.per_page
    &quot;Displaying records #{in_collection.offset + 1} - #{endnumber} of #{in_tot_count}&quot;
  end

# 3) controller 

    @codes = Code.paginate :conditions =&gt; conditions, :page =&gt; params[:page]
    @codes_count = Code.count

# 4) view: 

&lt;%= paginate_range @codes, @codes_count %&gt;
</code>
    <created-at type="datetime">2008-10-22T01:54:54Z</created-at>
    <description>returns &quot;Displaying records 1 - 10 of 35&quot;. used in codestacker</description>
    <id type="integer">82</id>
    <language-id type="integer">39</language-id>
    <privated type="boolean">false</privated>
    <title>record count and current records using will_paginate</title>
    <updated-at type="datetime">2008-10-22T02:29:47Z</updated-at>
    <user-id type="integer">7</user-id>
  </code>
</codes>
