Added better language support for Pagination library.

This commit is contained in:
Taylor Otwell 2011-07-21 08:46:37 -07:00
parent 46a15cf857
commit 556fff9ff0
1 changed files with 5 additions and 4 deletions

View File

@ -81,14 +81,15 @@ public static function page($total, $per_page)
/**
* Create the HTML pagination links.
*
* @param string $language
* @param int $adjacent
* @return string
*/
public function links($adjacent = 3)
public function links($language = null, $adjacent = 3)
{
if ($this->last_page() > 1)
{
return '<div class="pagination">'.$this->previous().$this->numbers($adjacent).$this->next();
return '<div class="pagination">'.$this->previous($language).$this->numbers($adjacent).$this->next($language);
}
return '';
@ -145,7 +146,7 @@ protected function slider($adjacent)
*/
public function previous($language = null)
{
$text = Lang::line('pagination.previous')->get($language);
$text = Lang::line('pagination.previous')->get($language, '&laquo; Previous');
if ($this->page > 1)
{
@ -163,7 +164,7 @@ public function previous($language = null)
*/
public function next($language = null)
{
$text = Lang::line('pagination.next')->get($language);
$text = Lang::line('pagination.next')->get($language, 'Next &raquo;');
if ($this->page < $this->last_page())
{