[ 3 posts ]

Dmitri Snytkine

  • Username: lampcms.com
  • Joined: Thu Aug 27, 2009 6:04 am
  • Posts: 94
  • Location: Poconos, PA
  • Twitter: snytkine
  • GitHub: snytkine
  • Gists: snytkine
  • Offline
  • Profile

How to translate the 'next', 'prev' labels?

Post Posted: Thu Aug 27, 2009 10:36 am
+0-
Hello!

I am trying to implement datatable with server-side sorting and pagination.

I am following an example on this page:
http://developer.yahoo.com/yui/examples ... cdata.html

What I don't understand is how can I translate the labels for 'next', 'prev', 'first page' and 'last page' in the pagination object. I need to be able to set these labels according to user's language because my site is multi-lingual and value of user's language is stored in $_SESSION['lang'] (I am using php)

I see that these values are configured in specific ui templates, but I just don't understand how do I pass configuration params for these specific ui templates when I instantiate the paginator object.

I think the paginator should ideally accept the config options for the ui objects, at instantiation time, but unfortunately it does not look like it does that.
:ugeek:
Can someone give me an advice on this. Maybe someone has already done this.

Luke Smith

YUI Contributor

  • Username: lsmith
  • Joined: Thu Aug 28, 2008 7:50 am
  • Posts: 507
  • Location: Sunnyvale
  • Twitter: ls_n
  • GitHub: lsmith
  • Gists: lsmith
  • IRC: ls_n
  • YUI Developer
  • Offline
  • Profile

Re: How to translate the 'next', 'prev' labels?

Post Posted: Thu Aug 27, 2009 10:57 am
+0-
Have a look at this example:
http://developer.yahoo.com/yui/examples ... ation.html

Dmitri Snytkine

  • Username: lampcms.com
  • Joined: Thu Aug 27, 2009 6:04 am
  • Posts: 94
  • Location: Poconos, PA
  • Twitter: snytkine
  • GitHub: snytkine
  • Gists: snytkine
  • Offline
  • Profile

Re: How to translate the 'next', 'prev' labels?

Post Posted: Thu Aug 27, 2009 11:06 am
+0-
Thanks. This is great, so the paginator does accept config options for previousPageLinkLabel and other labels right in the main config object. So I don't have to worry about getting the specific ui component from pager, then changing its config separately.

Very good news!
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum