Added better language support for Pagination library.
This commit is contained in:
parent
46a15cf857
commit
556fff9ff0
|
@ -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, '« 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 »');
|
||||
|
||||
if ($this->page < $this->last_page())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue