HD Quiz

Need to send invoices?
Check out my new WordPress plugin HDInvoice
Limited time launch sale

Hi, is there a way to translate via php the FINISH button…

Published: October 4, 2022
Support status: closed

is there a way to translate via php the FINISH button in many lenguages? my site is fully translated in italian, english, ecc… and i want to translate also the text of the FINISH button.
Many thanks

This thread has been imported from harmonicdesign.ca/hd-quiz/

thread author: Beniamino

Hi Beniamino,
the exact changes you’ll need to make will depend on how your site is currently being translated – so I’ll be making some assumptions with my pseudocode here.

First, you’ll need to, unfortunately, edit the plugin directly – so remember that updating HD Quiz will overwrite these changes.

If you edit ./hd-quiz/includes/functions.php on line ~729 you will see the function hdq_print_finish. The variable being used is called $finish_text, so this is the variable you’d want to override.

My recommendation would be before the button is echoed out, to figure out what language is being used for the current session, then based on that, set $finish_text to whatever is relevant to that language.

04 October 2022 — 12:21 support admin - Dylan

If you are enjoying HD Quiz please leave a review here on the official WordPress.org page. HD Quiz is developed by me, just some dude, and is supported and available for free. It may seem dumb, but truly nothing makes me happier than knowing that people are using and loving HD Quiz and my hard work.

This thread has either been marked as complete or has been automatically closed due to inactivity.