Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have installed the wp_paginate plugin and the WPML plugin. Now I have set 'Dutch' to the basic language and added 'English' as the second language.

I set the Blog posts to display to: All posts (display translation if it exists or posts in default language otherwise).

One page shows posts which don't need to be translated. So I left them in 'Dutch'. Only now the wp_paginate doesn't show me the pages in the 'English' version of my site. In the 'Dutch' version they do so up.

Here is the code I used:

<?php 
    $lstrPaged = (get_query_var('paged')) ? get_query_var('paged') : 1;

    query_posts('posts_per_page=5&paged=' . $lstrPaged);

    if(function_exists('wp_paginate')) 
    {
        if(ICL_LANGUAGE_CODE == 'en')
        {
            wp_paginate('title=Page:');
        } 
        else 
        {
            wp_paginate('title=Pagina:');
        }
    } 
?>
share|improve this question

2 Answers 2

first: query_posts() = doing_it_wrong(), you'd better use WP_Query or hook into pre_get_posts. See this thread for more info on when to use what.

Then if you have a look at one of the default themes, you will see that there is no need to translate pagination, as long as you code it in a GETTEXT string.

for example in twentyeleven:

wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) );
share|improve this answer

suppress_filters=1 did the trick!

share|improve this answer
2  
This doesn't appear to be a complete answer. Could you edit it and provide some commentary so that it is more obvious what you've done. –  s_ha_dum Jan 22 '13 at 22:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.