Will not change the “view all categories” under search page

This topic has 5 replies, 4 voices, and was last updated 8 hours, 15 minutes ago ago by Andrew Mitchell

  • Avatar: Boddicker
    Boddicker
    Participant
    December 23, 2024 at 23:51

    Hi

    I’m using loco to translate the page to Danish. Everything is working perfectly until the translation of the phrase “view all categories” under the popup search page. I have translated it in the core.po since that’s the only where it is found. But it doesn’t work.

    What am I doing wrong?

    Content is visible for topic creator and
    support staff only.
    Files is visible for topic creator and
    support staff only.
    4 Answers
    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    December 24, 2024 at 07:26

    Hello, @Boddicker,

    Thank you for contacting us and for using XStore.

    We kindly request that you rename your language file from “Dansk” to “Danish,” adjust the folder structure accordingly, and save the settings. For your reference, we have provided images in the private content area to guide you through the process.

    Additionally, we encourage you to review our theme documentation for further assistance:
    https://www.8theme.com/documentation/xstore/theme-translation/base-theme-translation/

    We trust that these steps will help resolve the issue. Should you require any further assistance, please do not hesitate to reach out.

    Best regards,
    The 8Theme Team

    Content is visible for topic creator and
    support staff only.
    Avatar: Boddicker
    Boddicker
    Participant
    December 24, 2024 at 09:25

    Hi

    It only reads “Dansk” and not Danish, because the wordpress language is Danish.

    The translation files are:
    da_DK.po

    and under core:
    xstore-core-da_DK.po

    I’ve change a lot of other text with loco and it works great. Even in the search pop up-page. No problems at all. It’s just that one button “view all categories” I can’t change.

    Avatar: Justin
    Luca Rossi
    Support staff
    December 24, 2024 at 10:27

    Dear @Boddicker,

    We hope this message finds you well.

    It seems that the issue with the text translation might be related to the Loco Translate plugin. To address this, we have added the following custom code to the functions.php file located in your child theme:

      
    function n2t_text_strings( $translated_text, $text, $domain ) {  
        switch ( $translated_text ) {  
            case 'View all categories':  
                $translated_text = 'Se alle kategorier';  
                break;  
        }  
        return $translated_text;  
    }  
    add_filter( 'gettext', 'n2t_text_strings', 20, 3 );  
    

    After implementing this code, the text was successfully translated, as shown in the following screenshot: https://prnt.sc/gIrf0iIX0cyG.

    Should you have any further questions or require additional assistance, please do not hesitate to reach out.

    Best regards,
    The 8Theme Team

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    December 24, 2024 at 10:29

    Dear Boddicker,

    Choosing our theme reflects your commitment to quality, and for that, we’re genuinely grateful. As we constantly strive to elevate your experience, your feedback is an invaluable gift. Could you kindly take a moment to rate our product with 5 stars on ThemeForest?

    Click here to share your insights: https://themeforest.net/downloads

    Your support fuels our journey, and we appreciate it more than words can express.

    Best Regards,
    The 8Theme Team

  • Viewing 5 results - 1 through 5 (of 5 total)

The issue related to '‘Will not change the “view all categories” under search page’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.