Quick View (popup) translation is not working even after using gettext filter

Solved4 replies3 participantsUpdated by Tony Rodriguez

XStore documentationTranslating XStore: Built-In Translations, Loco Translate or WPML
  • Avatar: islam
    islam
    Participant

    Hi, I’ve seen same question was asked and one answer is mentioning using a custom code but it’s hidden, anyway I’ve managed to translate some of the items on the ‘quick view’ popup using ‘gettext’ filter in functions.php, but still the (customer review) and category aren’t translated, any advise?

    Files is visible for topic creator and
    support staff only.

    4 Answers

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff

    Hello,

    In addition to using gettext, please add the following code to

    wp-content/themes/xstore-child/functions.php

    add_action( 'init', function () {
        if ( wp_doing_ajax() ) {
            switch_to_locale( get_option( 'WPLANG' ) ?: 'ar' );
        }
    }, 0 );

    Best regards,
    The 8Theme Team

    Avatar: islam
    islam
    Participant

    Great thanks

    Avatar: islam
    islam
    Participant

    Thanks for the support! My topic “Quick View (popup) translation is not working even after using gettext filter” has been successfully resolved.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff

    Dear islam,

    Thanks for being part of our WordPress & WooCommerce community!

    We’re happy we could assist you. Your feedback truly matters — it helps us make XStore better, faster, and more reliable with every release.

    Together, we’re shaping a better WooCommerce experience for everyone.

    Topic closed.
    The 8Theme Team

The issue related to '‘Quick View (popup) translation is not working even after using gettext filter’' has been successfully resolved, and the topic is now closed for further responses