• Hi,
    I have a translation problem :
    I can’t translate the “view details” button.
    I tried editing the .po file, but the “view details” text doesn’t appear in the .po file, I looked into every .php files to replace the text but couldn’t find it…
    All the rest is translated properly.
    Thank you !

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter audella

    (@audella)

    Hi,
    Can I have an answer please ?
    Thank you

    Plugin Author YITHEMES

    (@yithemes)

    Hi there,

    You can change the button label in plugin options: “Admin > YITH > Quick View”.

    Thread Starter audella

    (@audella)

    Hi,
    Thank you for the answer.
    I did set my translation in here, but it is not taken…
    Thank you !

    Plugin Author YITHEMES

    (@yithemes)

    Hi there,

    Could you share a screenshot with us ? Thanks!
    Please, could you try it with the default WordPress theme ?
    Thanks!

    Thread Starter audella

    (@audella)

    Hi,

    I don’t see any place to add an attachement to a message here ?

    I am afraid to loose things if I change theme, I’d rather not do it…

    thank you !

    Plugin Author YITHEMES

    (@yithemes)

    Hi,
    are you using any plugin to translate your strings?

    If you want to translate it through .po files provided in the plugin, you can translate the “Quick View” label, if you didn’t changed it in YITH > Quick View.
    Otherwise, if you changed it in YITH > Quick View, so, for example you set it to “Show quick view”, you can translate your custom text by adding the following code snippet to your theme functions.php

    if ( ! function_exists( 'yith_wcqv_customization_label_translation' ) ) {
    	add_filter( 'gettext', 'yith_wcqv_customization_label_translation', 10, 3 );
    	function yith_wcqv_customization_label_translation( $translation, $text, $domain = '' ) {
    		if ( 'yith-woocommerce-quick-view' === $domain ) {
    			$translations = array(
    				"Show quick view" => array(
    					'fr_FR' => "Aperçu rapide",
    					'it_IT' => "Dai un'occhiata",
    				),
    			);
    
    			$locale = determine_locale();
    			if ( isset( $translations[ $text ], $translations[ $text ][ $locale ] ) ) {
    				$translation = $translations[ $text ][ $locale ];
    			}
    		}
    
    		return $translation;
    	}
    }

    Please note: in the above mentioned code snippet you need to change the “Show quick view” text with the one you set in YITH > Quick View and the translations you want to use.
    So, for example if you set it to “MY CUSTOM TEXT” in YITH > Quick View and you want to add also the Spanish translation you should edit the code snippet as follows:

    $translations = array(
        "MY CUSTOM TEXT" => array(
            'fr_FR' => "Aperçu rapide",
            'it_IT' => "Dai un'occhiata",
            'es_ES' => "PUT HERE THE SPANISH TRANSLATION",
        ),
    );

    Please try this solution and let us know if everything works fine!

    Thread Starter audella

    (@audella)

    Hi,
    Thank you for your help.
    I think there is a misunderstanding :
    I don’t need to change the “quick view” button, this is set correctly.
    I need to translate the “view details” button, this button appears at the bottom of the quick view.
    Thank you for your help
    Regards
    Aude.

    Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    the “view details” button is a feature not included in this version of the plugin, we can’t support you on it here.
    We invite you contact us at our site at yithemes.com.
    Thank you..

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Translation “View details” button’ is closed to new replies.