Hi Eric,
yes, you can change the output not using *page_entries_info*, building
yourself an output similar to it in your own language.
To do that, in your view add this block instead of <% page_entries_info
@muebles %>
<div class="page_info">
<%= custom_page_info(@muebles) %>
</div>
<%= will_paginate(@muebles, :container => false, :previous_label => "«
anterior", :next_label => "siguiente »")%>
Then define into your view helper file the custom_page_info method:
def custom_page_info(collection, options = {})
entry_name = options[:entry_name] ||
(collection.empty?? 'elemento' :
collection.first.class.name.underscore.sub('_', ' '))
if collection.total_pages < 2
case collection.size
when 0; "Sin #{entry_name} encontrados."
when 1; "Encontrado <b>1 solo</b> #{entry_name}"
else; "Encuentra <b> todas las #{collection.size}</b>
#{entry_name.pluralize}"
end
else
%{#{entry_name.pluralize.capitalize} <b>%d - %d</b> de
<b>%d</b> en total.} % [
collection.offset + 1,
collection.offset + collection.length,
collection.total_entries
]
end
end
Sorry for my poor spanish, hope it helps!
Antonio Liccardo
Il giorno giovedě 8 novembre 2012 03:36:47 UTC+1, Eric Gonzalez ha scritto:
> Hi there!! I have a question
> is there a option to change the output of <% page_entries_info @muebles %>
> default
> Displaying Muebles *1 - 5* of *6* in total
> What I need is to change into Spanish
> Mostrando Muebles 1 - 5 de 6 en total
> thanks!