kriscreative.net Posted April 18, 2013 Share Posted April 18, 2013 (edited) Hi, My name is Kris and I'm a weekend website builder. At the moment I'm developing a multilingual website (English and Japanese) for a Taiko Drumming group that I'm also a member of. For the multilingual part I'm using the multilingual fields together with the language-gateway.php page as described in Example 3 from this link. The multilingual part works fine on pages without pagination. First code for all my templates is: <?php if($user->language->name != 'default') $segment = "/".$user->language->name; else $segment = ''; ?> A language switcher url is constructed as follows: $segment$page->url This setup works fine for all non-paginated pages. I included my language segment variable in the baseUrl for pagination as follows: $results= $page->children("event_start>=$today[0],limit=2,sort=event_start"); $pagination = $results->renderPager(array( baseUrl=>"$segment$page->url" )); This generates working links for the default language and for the first page of the non-default language. Working links: somedomainname.com/events/ --> This is the first page of the English language events page somedomainname.com/events/page2 --> This is the second page of the English language events page somedomainname.com/ja/events/ --> This is the first page of the Japanese language events page Problem link: somedomainname.com/ja/events/page2 --> This is the second page of the Japanese language events pageAny idea how I can work around this? Loving ProcessWire so far and hope we can find a solution for this problem. edit: Might have posted this in the wrong subforum. Sorry for that. Edited April 18, 2013 by kriscreative.net Link to comment Share on other sites More sharing options...
kriscreative.net Posted April 18, 2013 Author Share Posted April 18, 2013 Ok, problem is solved thanks to Google and an older post by Michael Murphy. Turns out I needed to turn on "Allow page numbers" for the language-gateway.php template also. 1 Link to comment Share on other sites More sharing options...
diogo Posted April 18, 2013 Share Posted April 18, 2013 Glad you solved it. Welcome to the forum ps: moved the topic to "General Support" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now