GSpeech and Qtranslate

Here you can ask or discuss anything else you want...

GSpeech and Qtranslate

New postby MrsT » Tue Feb 25, 2014 7:33 pm

For those using the Qtranslate plugin, this is the modifications I made to the script to obtain the correct languages. I'm sure there is a better approach to this, but this one worked for me :

To change speech language depending on the page language (ie. when in English picks up english speaker, when in French picks up French speaker....)

In display_options.php on Line 77:
$gspeech_lang = $wpgs_options['language'] == '' ? 'en' : $wpgs_options['language'];
Change it to:
$gspeech_lang = qtrans_getLanguage();

To have the bubble tip translate with the page language:
In display_options.php on Line 156:
$speech_title = 'Click to listen highlighted text!';
Change it to:
$speech_title = __('<!--:en-->Click to listen highlighted text!<!--:--><!--:fr-->Cliquer pour entendre le texte!<!--:-->', 'wpgs_domain');

Remember your changes in case they are replaced with a plugin update, you'll have to redo them.

Hope I helped someone with this. :ugeek:
MrsT
 
Posts: 2
Joined: Tue Feb 25, 2014 7:24 pm

Re: GSpeech and Qtranslate

New postby Simon » Tue Feb 25, 2014 9:07 pm

Hello,

Thanks for sharing the solution.

Best Regards,
Simon
User avatar
Simon
Site Admin
 
Posts: 1306
Joined: Wed Jul 13, 2011 8:53 pm


Return to Open discussion

Who is online

Users browsing this forum: No registered users and 1 guest