[Support request] Change language previous page search results

Home Forums Support [Support request] Change language previous page search results

Home Forums Support Change language previous page search results

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1570147
    Yvette

    Hi GeneratePress,

    When I do a search using search icon in header on my Norwegian site https://www.laaneoversikten.no/ the result page at the buttom has English text saying ¨Previous Page¨.

    Kindly advice how I can fix this from Enlgish to Norwegain (would be very happy with no coding answer if possible)?

    Thanks in advance.

    #1570601
    Leo
    Staff
    Customer Support

    Hi there,

    Can you try the PHP snippet here?

    add_filter( 'generate_next_link_text', function() {
        return 'Norwegain Next';
    } );
    add_filter( 'generate_previous_link_text', function() {
        return 'Norwegain Previous';
    } );

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    You just need to modify Norwegain Next and Norwegain Previous to the actual text you want to use.

    Let me know 🙂

    #1571302
    Yvette

    Hi,

    Noted, and thanks for fast response.

    It is not possible to solve without coding in the Dashboard and settings in WordPress?
    If not, kindly advice where I should copy in the text.

    Thanks in advance/YB

    #1571342
    David
    Staff
    Customer Support

    Hi there,

    both of the navigation links are set to Translate based upon the site language, so that should automatically happen if the translation files are available. As its not working the code that Leo provided is the best way to go – this article explains how to add that code (PHP) to your site:

    https://docs.generatepress.com/article/adding-php/

    TLDR:
    1. Are you using a Child Theme? If so then add the code to your child theme functions.php
    2. If you’re not using a Child Theme, then install the Code Snippets plugin ( link in the above document ) and create a new Snippet and add the code there, and simply save the snippet.

    #1571452
    Yvette

    Hi,

    Thanks again for quick response, and advice.

    What is the source program of the English ¨Next¨ and ¨Previous¨ words at the bottom of the search result page with Norwegian header at the top coming from? Is it from GP or WP itself?

    I am asking because the advice above is a bit difficult for a non tech person to follow. If I do nothing maybe the next translation can fix it?

    FYI: If GP want text translation to Norwegian, I will be happy to assist.

    #1572241
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Translations can be found here: https://translate.wordpress.org/projects/wp-themes/generatepress/nb/default/

    Looks like we’re missing a handful. Once those are updated and approved, things should automatically translate for you.

    Let me know if you need more info 🙂

    #1572521
    Yvette

    Noted, with big thanks.

    FYI: Will try to add suggestions for those few missing translations, but has never done before so can not promise that I manage (or will be accepted).

    #1573217
    Tom
    Lead Developer
    Lead Developer

    Thank you! Really appreciate that. Hopefully there’s an active editor in there that can approve them quickly 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.