• Hello. Very nice plugin with big potential.

    I suppose this plugin will essentially work on swiss websites. So I suppose most of the users will have a multilanguage website and will need to translate at least description (that is shown on the checkout page) and instructions (that will be shown in the thank you page).

    I think you should make life easier for those users, at least if they use the most popular translation plugins as Polylang, WPML …

    You have translated those strings, but once you save the plugin options, you have only the sentences saved in the options, and the translations will not be taken. If you have e.g. Polylang and you are visiting the checkout page in another language, you will see untranslated sentences.

    This a suggestion, not a support request.

    In my specific case, I’ve found a quick and dirty solution.

    I write it here, just in case other people have the same problem, and a cleaner solution is still not available:

    add_filter( 'option_woocommerce_wc_swiss_qr_bill_settings','cbd_translate_qr_swiss',0,1 );
    function cbd_translate_qr_swiss( $options ){
    	if( 
    		false !== strpos( $_SERVER['REQUEST_URI'],'/fr/' ) 
    		|| false !== strpos( $_SERVER['HTTP_REFERER'],'/fr/' ) 
    	){
    		$options['description'] = 'Payez facilement avec une facture QR suisse.';
    		$options['instructions'] = "La facture QR est jointe à votre email de confirmation de commande, merci de l'utiliser pour émettre votre paiement avec votre application bancaire.";
    	}
    	return $options;
    }

    In my case when the checkout page is the french version, I have /fr/ included in the URL. You need to check also the referer because this filter is called also during the ajax call by WooCommerce. At the second ajax call the language will be the main site language and the sentence would be updated with the untranslated one.

    In any case, this is a must-have plugin if you want QR Bill. Very good job!

Viewing 1 replies (of 1 total)
  • Hi @giuse very sorry for our late reply. Thanks a lot for your input, we are working on the next release and take this into consideration, we’ll confirm here when it’s solved.

Viewing 1 replies (of 1 total)
  • The topic ‘Suggestion about translations’ is closed to new replies.